<Connect>
Connect the call to a streaming destination: a raw audio WebSocket or an AI voice-agent relay.
Example
<Response>
<Connect action="https://app.example.com/relay-done">
<ConversationRelay url="wss://bot.example.com/relay"
welcomeGreeting="Hi! How can I help you today?"/>
</Connect>
</Response>
Attributes
| Attribute | Default | Behaviour |
|---|---|---|
action |
unset |
URL posted when the connected session ends; the returned VoiceML continues the call. The posted fields depend on the noun: stream-result fields for <Stream>, RelayStatus/RelayDuration/HandoffData for <ConversationRelay>. |
method |
POST |
HTTP method for the action request: POST or GET. |
Nesting
<Connect> accepts these nested elements:
Notes
- <Connect> blocks until the session ends (WebSocket closes or the call hangs up). For a non-blocking audio fork, use <Start><Stream>.
- Other nouns under <Connect> (hosted video rooms, hosted bot products) are not supported and return an unsupported-element error — use <ConversationRelay> for voice-AI integrations.