TwiML™ Voice: <Connect>
Info
<Connect><Stream>
is now available in the Ireland (IE1) and Australia (AU1) Regions.
- For outbound calls, follow the guide for outbound calls in non-US Regions.
- For inbound calls, follow the guide for inbound call processing in non-US Regions.
- For more info on Twilio Regions, vist the Global Infrastructure docs.
Regional support is not available for <Room>
, or <VirtualAgent>
.
<Connect>
is a TwiML verb that works together with nested TwiML nouns to connect Voice calls (over PSTN or SIP) to other Twilio services or external services.
<Connect>
supports the following attributes that change its behavior:
The action
attribute accepts an absolute or relative URL as a value. When the <Connect>
verb ends, Twilio sends an HTTP request to this URL with Twilio's standard request parameters along with some parameters specific to the nested noun.
If you do not provide an action
URL, <Connect>
will finish and Twilio will move on to the next TwiML verb in the document. If there is no further verb, Twilio will end the phone call.
The method
attribute specifies how Twilio will request the action
URL: either using HTTP GET
or POST
. By default, Twilio uses POST
.
The nouns that you can nest inside of <Connect>
are listed in the table below. Click on a TwiML noun to see its docs page and how to use the noun with <Connect>.
Noun | Description |
---|---|
<ConversationRelay> | <Connect><ConversationRelay> connects a call to a ConversationRelay service |
<Room> | <Connect><Room> connects a call to a Programmable Video Room |
<Stream> | <Connect><Stream> starts a bidirectional MediaStream |
<VirtualAgent> | <Connect><VirtualAgent> connects a call to a Dialogflow VirtualAgent |