<Connect> verb starts the service defined in the nested noun in synchronous mode. The following instructions will be executed when the service is stopped.
Attributes
| ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT |
|---|---|---|---|
action | Optional URL where TeXML will make a request when the <Connect> service ends to retrieve a new set of TeXML instructions to continue the call flow. Supported for the <ConversationRelay> and <AIAssistant> nouns. | - | |
method | HTTP method to use when requesting the action URL. | GET, POST | POST |
Child verbs/nouns
| NOUN/VERB | DESCRIPTION |
|---|---|
Stream | Start media stream over websocket. See the Stream documentation for more information. |
ConversationRelay | Route a call to a ConversationRelay service that provides voice interactions over a WebSocket connection. See the ConversationRelay documentation for more information. |
AIAssistant | Start a voice assistant on the call. See the AIAssistant documentation for more information. |
Expected callbacks
Ifaction is set, TeXML makes a request to the action URL when the connected service ends and executes the TeXML instructions returned in the response, replacing the remaining call flow. This is supported for the <ConversationRelay> and <AIAssistant> nouns.
The request payload includes a Reason field describing why the service ended. For <AIAssistant>, common reasons include normal (a transfer is in progress — the call flow continues and the action is not requested), service_error, stt_error, handoff, and hangup. The action endpoint can branch on Reason to decide how to continue the call — for example, returning a <Dial> to a human agent when the conversation ended with a server-error reason.