Error handling and service continuation
This page explains how to maintain continuation of service and how errors can be handled in setups with VoiceAI Connect. Mitigation of errors can be done for both new calls and ongoing calls.
The following configuration options can be used for mitigating problems:
-
VoiceAI Connect High-Availability: Redundancy of VoiceAI Connect components can be used for fail-over of new calls.
-
Alternative routing: Define what should be done in case a conversation fails to initiate. For example, re-route to a human agent or play a prompt.
-
Fail-over actions: Define what should be done in case a conversation was terminated due to an error. For example, re-route to a human agent or play a prompt.
-
Defining timeouts: Optimize the timeouts for your setup for best user experience.
-
Handling bot delays: Play a prompt to the user in case a delay occurs.
Errors overview
Loss of connectivity
Such errors can occur either when a call is initiated or during a call, and might be temporary or permanent.
For problems that occur before the call was initiated, the SBC can be configured to perform an alternative route to a human agent. See Defining alternative routing below.
For problems that occur during a call, you can Defining fail-over actions as described below.
For problems that only cause a delay with the bot response, you can use the handle the bot delay as described below.
Bot logic errors
As most of the bot frameworks allows code to be executed as part of the bot's logic (e.g., using a webhook), there might be exceptions or connectivity problems during the execution.
We recommended to trap or catch all the exceptions in the code, so errors could be handled according to the bot's internal logic.
Additionally, some bot frameworks allows you to specify an action to be taken when a webhook execution fails (e.g., Dialogflow CX handling).
In case the error was not handled internally by the bot, it is usually reflected to VoiceAI Connect as a bot-framework service error (see next section).
Bot-framework service errors
VoiceAI Connect might receive an error response from the bot-framework service due to either connectivity problems or bot logic errors. Usually, both types of errors will have the same handling, and will disconnect the conversation with the bot.
You can define fail-over actions for handling those timeouts.
VoiceAI Connect failures
VoiceAI Connect High-Availability can be used to maintain continuation of service in case of failure in one of VoiceAI Connect components.
When an error occur in one of the VoiceAI Connect components during an ongoing conversation, it will usually lead to disconnection of the conversation with the bot.
Mitigation options
VoiceAI Connect High-Availability
High-Availability (HA) is achieved by deploying a cluster of VoiceAI Connect components. All component in the cluster share the same configuration, and new calls are load-balanced between the components.
In case of failure of one component, new calls are seamlessly routed to one of the active components.
Please contact AudioCodes support for more information.
Defining alternative routing
The SBC can be configured to perform alternative routing in cases of call initiation failures. The alternative route can be to a human agent, to another bot or to playing a prompt to the user.
Please contact AudioCodes support for more information.
Defining fail-over actions
You can define what will be the actions to perform in case of failure during an ongoing call (a call that is already connected).
The errors that are handled can be one of the following:
-
Bot framework errors
-
Speech service errors
-
Logical errors on VoiceAI Connect
The actions can be any combination of:
-
Play a prompt to the user (textual or audio file).
-
Transfer the call (to a human agent or to another bot).
-
Disconnect the call with specific reason.
-
Switch to an alternative speech service provider.
General fail-over
Parameter |
Type |
Description |
---|---|---|
String |
Defines activities that are executed sequentially in case of an error during an ongoing call. The value of this parameter should match the By default, the parameter is not defined. For more information, please contact AudioCodes support. |
Alternative speech-to-text providers in case of speech-to-text failure
The Administrator can configure fallback speech-to-text providers using the following parameter.
Parameter |
Type |
Description |
---|---|---|
List |
The Defines alternative speech-to-text providers in case of a speech-to-text error during an ongoing call.
This list will provide up to 5 alternative speech-to-text providers in case of an speech-to-text error. VoiceAI Connect will add the original provider to this list (i.e., if all the providers listed fail, Voice AI Connect will retry with the original speech-to-text provider). For VoiceAI Connect Enterprise, this feature is supported only from Version 3.8 and later.
The following shows an example of configuration with an alternative speech-to-text provider: { "sttFallbackProvider": [ { "sttProvider": "other provider", "sttEndpointId": "Endpoint ID", "sttContextId": "Context Id value", "sttModel": "stt model type" } ] } |
Alternative text-to-speech providers in case of text-to-speech fail-over
Parameter |
Type |
Description |
---|---|---|
List |
Defines alternative text-to-speech providers in case of a text-to-speech error during an ongoing call.
This list will provide up to 5 alternative text-to-speech providers in case of an text-to-speech error. Voice AI Connect will add the original provider to this list (i.e., if all the providers listed fail, Voice AI Connect will retry with the original text-to-speech provider). For VoiceAI Connect Enterprise, this feature is supported only from Version 3.8 and later.
The following shows an example of configuration with an alternative text-to-speech provider: { "ttsFallbackProviders": [ { "ttsProvider": "provider Name", "voiceName": "voice name output", "ttsDeploymentId": "deploymentId string" } ] } |
General text-to-speech fail-over
Parameter |
Type |
Description |
---|---|---|
Integer |
Defines how many times VoiceAI Connect tries to send the prompt when it receives a text-to-speech playback error from the SBC. The default is 2. A value of 0 means that VoiceAI Connect does not attempt to send the prompt again. The valid range is 0 to 5. The default is 2. This parameter is applicable only to VoiceAI Connect Enterprise (Version 3.22 and later).
|
Handling bot delays
For handling bot delays (or no response from the bot), see Handling bot delay.
Azure-specific configuration
The following bot parameter can be used to define how bot errors are handled:
Parameter |
Type |
Description |
---|---|---|
Boolean |
Defines what happens when the Azure bot error "retry" occurs.
Note: The "retry" error might occur when there is a problem or delay in the bot code. It does not necessarily indicate a non-recoverable problem. Hence, this parameter is only used on specific setups. This parameter is applicable only to VoiceAI Connect Enterprise (Version 3.22 and later).
|
The following providers parameter can be used to define retries for sending messages to the bot:
Parameter |
Type |
Description |
---|---|---|
Integer |
Defines the number of times the VoiceAI Connect attempts to send a message to an Azure bot before failing due to a timeout. The valid range is 0 to 5. The default is 0. Note:
|
Defining timeouts
The following provider parameters can be used for setting timeouts for various services. You can define fail-over actions for handling those timeouts.
Parameter |
Type |
Description |
---|---|---|
Integer |
Defines the maximum time (in milliseconds) that VoiceAI Connect waits for bot response before timeout. The default is 10,000 (10 seconds). |
|
Integer |
Defines the number of retry requests towards the bot in case of no response and connectivity error codes. The default is 2. |
|
Integer |
Defines the number of retry requests towards the text-to-speech provider in case of no response or a connectivity error response code. Each retry is done after The valid value is 0 to 10. The default is 1. This parameter is applicable only to VoiceAI Connect Enterprise Version 3.20 and later. |
|
Integer |
Defines the maximum time (in milliseconds) that VoiceAI Connect Enterprise waits for a response from the text-to-speech provider. The valid value is 10 to 600,000. The default is 10,000. If no response is received when this timeout expires, VoiceAI Connect Enterprise tries again to communicate with the text-to-speech provider (number of retries according to If the call is disconnected, the SIP BYE message sent by the SBC to the user indicates this failure, by prefixing the value in the Reason header with "TTS Err:". Note: In this scenario (disconnect), you can also configure VoiceAI Connect Enterprise to perform specific activities, for example, playing a prompt to the user or transferring the call (see the |
|
Integer |
Defines the maximum time (in milliseconds) that VoiceAI Connect Enterprise waits for a response from the speech-to-text provider. The valid value is 10 to 600,000. The default is 10,000. If no response is received when this timeout expires, VoiceAI Connect Enterprise disconnects the call with the SBC. If the call is disconnected, the SIP BYE message sent by the SBC to the user indicates this failure by prefixing the value in the Reason header with "STT Err:". Note:
|