Handling bot delay
In case the bot takes time to respond to a message sent to it, you can configure VoiceAI Connect Enterprise to take an action.
By setting timeouts, the following actions can be configured:
-
Play a textual prompt to the user
-
Play an audio file to the user
-
Disconnect the call
-
Resume speech recognition (so the call will not remain hanging)
-
Split the bot's prompt into two or more messages, with a delay between messages
For cases that the call is disconnected due to bot timeout, the administrator can define fail-over actions for handling it.
How do I use it?
To play a message to the user, configure a timeout using the parameter botNoInputTimeoutMS
and define the action:
-
To play a textual prompt to the user, set the prompt on the
botNoInputSpeech
parameter. -
To play an audio file to the user, set the URL of the file on the
botNoInputUrl
parameter.
To play the message again if the timeout expires more than once, configure the number of retries on the botNoInputRetries
parameter.
A separate timeout can be defined for disconnecting the call. This timeout is set with the botNoInputGiveUpTimeoutMS
parameter.
If no message is received from the bot, VoiceAI Connect Enterprise resumes speech recognition after 10 seconds. You can modify this timeout using the resumeRecognitionTimeoutMS
parameter. You can also have a recorded audio message or text message played to the user when the recognition is resumed, by setting the resumeRecognitionSpeech
or resumeRecognitionPlayUrl
parameters. If the botNoInputTimeout
expires before resumeRecognitionTimeout
and a prompt is played to the user, the time to resume recognition is counted from the end of the prompt.
If you want the bot to break its response into two messages (with a delay between first and second bot response), use the expectAnotherBotMessage
parameter. VoiceAI Connect Enterprise stops the User Input timer and starts the Bot Input timer.
Example
The following event can be sent by the bot to configure the following:
-
Play a prompt to the user if the bot has not replied within 1 second.
-
Disconnect the call if the bot has not replied within 10 seconds.
{ "type": "event", "name": "config", "sessionParams": { "botNoInputTimeoutMS": 1000, "botNoInputSpeech": "Please wait for bot input.", "botNoInputGiveUpTimeoutMS": 10000 } }
{ "type": "event", "name": "config", "channelData": { "sessionParams": { "botNoInputTimeoutMS": 1000, "botNoInputSpeech": "Please wait for bot input.", "botNoInputGiveUpTimeoutMS": 10000 } } }
Add a Custom Payload response with the following content:
{ "activities": [{ "type": "event", "name": "config", "sessionParams": { "botNoInputTimeoutMS": 1000, "botNoInputSpeech": "Please wait for bot input.", "botNoInputGiveUpTimeoutMS": 10000 } }] }
Add a Custom Payload response with the following content:
{ "activities": [{ "type": "event", "name": "config", "sessionParams": { "botNoInputTimeoutMS": 1000, "botNoInputSpeech": "Please wait for bot input.", "botNoInputGiveUpTimeoutMS": 10000 } }] }
{ "activities": [{ "type": "event", "name": "config", "sessionParams": { "botNoInputTimeoutMS": 1000, "botNoInputSpeech": "Please wait for bot input.", "botNoInputGiveUpTimeoutMS": 10000 } }] }
Parameters description
The following table lists the bot parameters that are used to configure this feature:
See Changing call settings for details on how these parameters can be applied.
Parameter |
Type |
Description |
---|---|---|
Number |
Defines the timeout (in milliseconds) for bot response before the call is disconnected. If no response is received when the timeout expires, VoiceAI Connect disconnects the call with the SBC. The default is 0 (i.e., no timeout for bot response). If the call is disconnected, the SIP BYE message sent by the SBC to the user indicates this failure. |
|
Number |
Defines the timeout (in milliseconds) for before a prompt is played to the user. If no input is received from the bot when this timeout expires, VoiceAI Connect can either play a textual prompt (see the The default is 0 (i.e., no timeout for bot response). |
|
Number |
Defines the maximum number of recurring timeouts (configured by the If this parameter is configured, the timer will be triggered again after playing the no-bot-input prompt to the user. For example, if the parameter is set to 2, the timeout is set to 1000 ms, and no response was received from the bot, VoiceAI Connect will play the prompt 3 times: after 1 (initial timeout), 2 (first retry) and 3 (second retry) seconds. The default is 0 (i.e., only one timeout – no retries). |
|
String |
Defines the textual prompt to play to the user when no input has been received from the bot when the timeout expires (configured by The prompt can be configured in plain text or in Speech Synthesis Markup Language (SSML) format (see Using SSML for more details). By default, the parameter is not configured. Note:
|
|
String |
Defines the URL from where the audio file is played to the user when no input has been received from the bot when the timeout expires (configured by botNoInputTimeoutMS). By default, the parameter is not configured. Note: If you have also configured the botNoInputSpeech parameter, botNoInputSpeech takes precedence. |
|
Number |
When Barge-In is disabled, speech input is not expected before the bot's response has finished playback. If no reply from the bot arrives within this configured timeout (in milliseconds), VoiceAI Connect Enterprise expects speech input from the user and speech-to-text recognition is re-activated. If The valid value is 0 (i.e., no automatic resumption of recognition) to 600,000 (i.e., 10 minutes). The default is 10,000. |
|
String |
Defines the text message played to the user when For VoiceAI Connect Enterprise, this feature is supported only from Version 3.24 and later.
|
|
String |
Defines the URL from where an audio file is played to the user when For VoiceAI Connect Enterprise, this feature is supported only from Version 3.24 and later.
|
|
Boolean |
Enables the bot to break its response into two or more messages.
NOTE: if the bot wants to prevent caller speech during the delayed response period, the This feature is applicable to VoiceAI Connect Enterprise Version 3.18 and later.
|