Skip to main content

Uniphore Customer Portal

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>

Multimodal Call without Message
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 ''
Multimodal Call with Message
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

Request Body

Data

The message to be played before terminating the call.

Example: Thanks for filling the form. We will get back to you shortly.

Optional

disconnectAfterPlaying

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

speechNoInputTimeout

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 speechNoInputTimeout and the user does not speak for the given seconds in a call, then the no input prompt is played.

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 speechNoInputTimeout is set to 5 and noInputTimeout in Domain Properties API is set to 3 then prompt is played when user is silent for 5 seconds and not after 3 seconds. Using this API, flow admin can override no input timeout with speechNoInputTimeout .

Optional

discardUserInput

Boolean

If discardUserInput is set to True then the user input are not sent to ASR and VAD. The user input are not processed, even if the call continues.

If discardUserInput is set to False then the connector allows the receive voice input from user which is sent to ASR and VAD for processing.

Optional

apikey

String

apikey is an authorization token that is provided when making API calls.

Reach out to Platform team to obtain the apikey.

Required

Response and Error Codes

Response Code

Condition

200

Ok

400

Bad request

401

Unauthorized