Handling bot delay

Handling unexpected 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:

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 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.

Playing filler music

This feature can be used to play an audio file to the user (with music or comfort noise for example) until the bot responds. This is useful particularly when the bot is expected to take a while to respond.

How do I use it?

To play filler music, set the parameter botNoInputTimeoutMS to a value greater than 0.

Set the parameter botNoInputUrl with the URL of the file.

Set the parameter abortPlayUrlOnBotMessage to true.

If the bot can sometimes respond quickly, in order to improve the user experience, consider setting a botNoInputTimeoutMS of a few seconds, so that music is not played and interrupted within a very short time.

Example

The following event can be sent by the bot to configure the following:

AudioCodes Bot API
{
  "type": "event",
  "name": "config",
  "sessionParams": {
    "botNoInputTimeoutMS": 1000,
    "botNoInputSpeech": "Please wait for bot input.",
    "botNoInputGiveUpTimeoutMS": 10000
  }
}
Microsoft Bot Framework
{
  "type": "event",
  "name": "config",
  "channelData": {
    "sessionParams": {
      "botNoInputTimeoutMS": 1000,
      "botNoInputSpeech": "Please wait for bot input.",
      "botNoInputGiveUpTimeoutMS": 10000
    }
  }
}
Dialogflow CX

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
    }
  }] 
}
Dialogflow ES

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
    }
  }] 
}
Amazon Lex V2
{
  "activities": [{
    "type": "event",
    "name": "config",
    "sessionParams": {
      "botNoInputTimeoutMS": 1000,
      "botNoInputSpeech": "Please wait for bot input.",
      "botNoInputGiveUpTimeoutMS": 10000
    }
  }] 
}