Class: Twilio::TwiML::Connect
- Defined in:
- lib/twilio-ruby/twiml/voice_response.rb
Overview
<Connect> TwiML Verb
Instance Attribute Summary
Attributes inherited from TwiML
Instance Method Summary collapse
-
#assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) {|assistant| ... } ⇒ Object
- Create a new <Assistant> element id
- The assistant ID of the AI Assistant language
- Language to be used for both text-to-speech and transcription tts_language
- Language to be used for text-to-speech transcription_language
- Language to be used for transcription tts_provider
- Provider to be used for text-to-speech voice
- Voice to be used for text-to-speech transcription_provider
- Provider to be used for transcription speech_model
- Speech model to be used for transcription profanity_filter
- Whether profanities should be filtered out of the speech transcription dtmf_detection
- Whether DTMF tones should be detected and reported in speech transcription welcome_greeting
- The sentence to be played automatically when the session is connected partial_prompts
- Whether partial prompts should be reported to WebSocket server before the caller finishes speaking interruptible
- Whether caller’s speaking can interrupt the play of text-to-speech interrupt_by_dtmf
- Whether DTMF tone can interrupt the play of text-to-speech welcome_greeting_interruptible
- Whether caller’s speaking can interrupt the welcome greeting debug
- Whether debugging on the session is enabled keyword_args
-
additional attributes.
-
#autopilot(name, **keyword_args) ⇒ Object
- Create a new <Autopilot> element name
- Autopilot assistant sid or unique name keyword_args
-
additional attributes.
-
#conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) ⇒ Object
- Create a new <Conversation> element service_instance_sid
- Service instance Sid inbound_autocreation
- Inbound autocreation routing_assignment_timeout
- Routing assignment timeout inbound_timeout
- Inbound timeout url
- TwiML URL method
- TwiML URL method record
- Record trim
- Trim recording_status_callback
- Recording status callback URL recording_status_callback_method
- Recording status callback URL method recording_status_callback_event
- Recording status callback events status_callback
- Status callback URL status_callback_method
- Status callback URL method status_callback_event
- Events to call status callback URL keyword_args
-
additional attributes.
-
#conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) {|conversation_relay| ... } ⇒ Object
- Create a new <ConversationRelay> element url
- URL of the remote service where the session is connected to language
- Language to be used for both text-to-speech and transcription tts_language
- Language to be used for text-to-speech transcription_language
- Language to be used for transcription tts_provider
- Provider to be used for text-to-speech voice
- Voice to be used for text-to-speech transcription_provider
- Provider to be used for transcription speech_model
- Speech model to be used for transcription profanity_filter
- Whether profanities should be filtered out of the speech transcription dtmf_detection
- Whether DTMF tones should be detected and reported in speech transcription welcome_greeting
- The sentence to be played automatically when the session is connected partial_prompts
- Whether partial prompts should be reported to WebSocket server before the caller finishes speaking interruptible
- Whether caller’s speaking can interrupt the play of text-to-speech interrupt_by_dtmf
- Whether DTMF tone can interrupt the play of text-to-speech welcome_greeting_interruptible
- Whether caller’s speaking can interrupt the welcome greeting debug
- Whether debugging on the session is enabled keyword_args
-
additional attributes.
-
#initialize(**keyword_args) {|_self| ... } ⇒ Connect
constructor
A new instance of Connect.
-
#room(name, participant_identity: nil, **keyword_args) ⇒ Object
- Create a new <Room> element name
- Room name participant_identity
- Participant identity when connecting to the Room keyword_args
-
additional attributes.
-
#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object
- Create a new <Stream> element name
- Friendly name given to the Stream connector_name
- Unique name for Stream Connector url
- URL of the remote service where the Stream is routed track
- Track to be streamed to remote service status_callback
- Status Callback URL status_callback_method
- Status Callback URL method keyword_args
-
additional attributes.
-
#virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|virtual_agent| ... } ⇒ Object
- Create a new <VirtualAgent> element connector_name
- Defines the conversation profile Dialogflow needs to use language
- Language to be used by Dialogflow to transcribe speech sentiment_analysis
- Whether sentiment analysis needs to be enabled or not status_callback
- URL to post status callbacks from Twilio status_callback_method
- HTTP method to use when requesting the status callback URL keyword_args
-
additional attributes.
Methods inherited from TwiML
#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml
Constructor Details
#initialize(**keyword_args) {|_self| ... } ⇒ Connect
Returns a new instance of Connect.
1891 1892 1893 1894 1895 1896 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1891 def initialize(**keyword_args) super(**keyword_args) @name = 'Connect' yield(self) if block_given? end |
Instance Method Details
#assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) {|assistant| ... } ⇒ Object
Create a new <Assistant> element
- id
-
The assistant ID of the AI Assistant
- language
-
Language to be used for both text-to-speech and transcription
- tts_language
-
Language to be used for text-to-speech
- transcription_language
-
Language to be used for transcription
- tts_provider
-
Provider to be used for text-to-speech
- voice
-
Voice to be used for text-to-speech
- transcription_provider
-
Provider to be used for transcription
- speech_model
-
Speech model to be used for transcription
- profanity_filter
-
Whether profanities should be filtered out of the speech transcription
- dtmf_detection
-
Whether DTMF tones should be detected and reported in speech transcription
- welcome_greeting
-
The sentence to be played automatically when the session is connected
- partial_prompts
-
Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
- interruptible
-
Whether caller’s speaking can interrupt the play of text-to-speech
- interrupt_by_dtmf
-
Whether DTMF tone can interrupt the play of text-to-speech
- welcome_greeting_interruptible
-
Whether caller’s speaking can interrupt the welcome greeting
- debug
-
Whether debugging on the session is enabled
- keyword_args
-
additional attributes
2012 2013 2014 2015 2016 2017 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 2012 def assistant(id: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) assistant = Assistant.new(id: id, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, interruptible: interruptible, interrupt_by_dtmf: interrupt_by_dtmf, welcome_greeting_interruptible: welcome_greeting_interruptible, debug: debug, **keyword_args) yield(assistant) if block_given? append(assistant) end |
#autopilot(name, **keyword_args) ⇒ Object
Create a new <Autopilot> element
- name
-
Autopilot assistant sid or unique name
- keyword_args
-
additional attributes
1911 1912 1913 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1911 def autopilot(name, **keyword_args) append(Autopilot.new(name, **keyword_args)) end |
#conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) ⇒ Object
Create a new <Conversation> element
- service_instance_sid
-
Service instance Sid
- inbound_autocreation
-
Inbound autocreation
- routing_assignment_timeout
-
Routing assignment timeout
- inbound_timeout
-
Inbound timeout
- url
-
TwiML URL
- method
-
TwiML URL method
- record
-
Record
- trim
-
Trim
- recording_status_callback
-
Recording status callback URL
- recording_status_callback_method
-
Recording status callback URL method
- recording_status_callback_event
-
Recording status callback events
- status_callback
-
Status callback URL
- status_callback_method
-
Status callback URL method
- status_callback_event
-
Events to call status callback URL
- keyword_args
-
additional attributes
1963 1964 1965 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1963 def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, url: nil, method: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args) append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, url: url, method: method, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args)) end |
#conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) {|conversation_relay| ... } ⇒ Object
Create a new <ConversationRelay> element
- url
-
URL of the remote service where the session is connected to
- language
-
Language to be used for both text-to-speech and transcription
- tts_language
-
Language to be used for text-to-speech
- transcription_language
-
Language to be used for transcription
- tts_provider
-
Provider to be used for text-to-speech
- voice
-
Voice to be used for text-to-speech
- transcription_provider
-
Provider to be used for transcription
- speech_model
-
Speech model to be used for transcription
- profanity_filter
-
Whether profanities should be filtered out of the speech transcription
- dtmf_detection
-
Whether DTMF tones should be detected and reported in speech transcription
- welcome_greeting
-
The sentence to be played automatically when the session is connected
- partial_prompts
-
Whether partial prompts should be reported to WebSocket server before the caller finishes speaking
- interruptible
-
Whether caller’s speaking can interrupt the play of text-to-speech
- interrupt_by_dtmf
-
Whether DTMF tone can interrupt the play of text-to-speech
- welcome_greeting_interruptible
-
Whether caller’s speaking can interrupt the welcome greeting
- debug
-
Whether debugging on the session is enabled
- keyword_args
-
additional attributes
1986 1987 1988 1989 1990 1991 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1986 def conversation_relay(url: nil, language: nil, tts_language: nil, transcription_language: nil, tts_provider: nil, voice: nil, transcription_provider: nil, speech_model: nil, profanity_filter: nil, dtmf_detection: nil, welcome_greeting: nil, partial_prompts: nil, interruptible: nil, interrupt_by_dtmf: nil, welcome_greeting_interruptible: nil, debug: nil, **keyword_args) conversation_relay = ConversationRelay.new(url: url, language: language, tts_language: tts_language, transcription_language: transcription_language, tts_provider: tts_provider, voice: voice, transcription_provider: transcription_provider, speech_model: speech_model, profanity_filter: profanity_filter, dtmf_detection: dtmf_detection, welcome_greeting: welcome_greeting, partial_prompts: partial_prompts, interruptible: interruptible, interrupt_by_dtmf: interrupt_by_dtmf, welcome_greeting_interruptible: welcome_greeting_interruptible, debug: debug, **keyword_args) yield(conversation_relay) if block_given? append(conversation_relay) end |
#room(name, participant_identity: nil, **keyword_args) ⇒ Object
Create a new <Room> element
- name
-
Room name
- participant_identity
-
Participant identity when connecting to the Room
- keyword_args
-
additional attributes
1903 1904 1905 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1903 def room(name, participant_identity: nil, **keyword_args) append(Room.new(name, participant_identity: participant_identity, **keyword_args)) end |
#stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|stream| ... } ⇒ Object
Create a new <Stream> element
- name
-
Friendly name given to the Stream
- connector_name
-
Unique name for Stream Connector
- url
-
URL of the remote service where the Stream is routed
- track
-
Track to be streamed to remote service
- status_callback
-
Status Callback URL
- status_callback_method
-
Status Callback URL method
- keyword_args
-
additional attributes
1924 1925 1926 1927 1928 1929 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1924 def stream(name: nil, connector_name: nil, url: nil, track: nil, status_callback: nil, status_callback_method: nil, **keyword_args) stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args) yield(stream) if block_given? append(stream) end |
#virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) {|virtual_agent| ... } ⇒ Object
Create a new <VirtualAgent> element
- connector_name
-
Defines the conversation profile Dialogflow needs to use
- language
-
Language to be used by Dialogflow to transcribe speech
- sentiment_analysis
-
Whether sentiment analysis needs to be enabled or not
- status_callback
-
URL to post status callbacks from Twilio
- status_callback_method
-
HTTP method to use when requesting the status callback URL
- keyword_args
-
additional attributes
1939 1940 1941 1942 1943 1944 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1939 def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args) virtual_agent = VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args) yield(virtual_agent) if block_given? append(virtual_agent) end |