Twilio Multimodal API
Twilio Multimodal API
In a multimodal call, end user can submit information through a chat bot on the mobile browser. User takes several seconds to submit the information, if no input is provided the call gets disconnected after the no input prompts are played.
This API allows the flow admin to reset the speech no input time out depending on the kind of information required from the user. It also allows to play a message before call termination; enable or disable sending the user's voice input to the ASR or VAD. This API can be called any number of times in the flow.
This API is added to an Integration Point under Resources in X‑Platform and used through Integration Point element in X‑Designer.
EndPoint
Method: POST
URL: http://localhost:port/tcr/playMessage/callSid/<callId>
curl --location --request POST 'http://localhost:9929/tcr/playMessage/callSid/12?disconnectAfterPlaying=true&speechNoInputTimeout=-1&discardUserInput=true&apikey=bXktdm9pY2UtaXzc3dvcmQtdGVuYW50LXN0YWdpbmd1c3MtdXNlbGZzZXJ2ZQ%3D%3D'\ --header 'Content-Type: text/plain' \ --data ''
curl --location 'http://localhost:9929/tcr/playMessage/callSid/12?disconnectAfterPlaying=true&speechNoInputTimeout=-1&discardUserInput=true&apikey=bXktdm9pY2UtaXMtbXktcGFzc3dvcmQtdGLXN0YWdpbmd1c3MtdXNlbGZzZXJ2ZQ%3D%3D'\ --header 'Content-Type: text/plain' \ --data 'Please click the link to open the form and enter the data.'
Path Parameter
Parameter Name | Data Type | Description | Required / Optional |
---|---|---|---|
callId | String | Call Id of the ongoing voice call. | Required |
Query Parameter
Parameter Name | Data Type | Description | Required / Optional |
---|---|---|---|
| Data | The message to be played before terminating the call. Example: Thanks for filling the form. We will get back to you shortly. | Optional |
| Boolean | If set to True then disconnects the call after the playing the message entered in the Request Body. If there is no message in the Request Body, the call gets disconnected whenever the API is invoked. If set to False then there will be no impact to the call. | Optional |
| Integer | The length of time (in seconds) that the system will wait during a call for the user to speak. When a value is given in Accepted values are >0 or -1. To disable Speech No Input Timeout for the call, set -1 as value. DTMF timeout is not affected by this parameter. Example: If | Optional |
| Boolean | If If | Optional |
| String |
Reach out to Platform team to obtain the | Required |
Response and Error Codes
Response Code | Condition |
---|---|
200 | Ok |
400 | Bad request |
401 | Unauthorized |