Receiving audio playback failure notification

If playUrlFailureHandling parameter value is set to notify-bot and there was a failure playing an audio for a playURL event, VoiceAI Connect sends a 'playUrlFailure' event to indicate the action failed.


How do I use it?

The following table lists the fields of the playUrlFailureHandling event:

See Changing call settings for details on how these parameters can be applied.

Parameter

Type

Description

playUrlUrl

String

Defines the URL where the audio file is located.

reason

String

In case of failure, includes a free text explaining the failure.

selfGenerated

Boolean

Indicates whether the playUrl request was from the bot or from VoiceAI Connect:

  • true: playUrl was triggered by VoiceAI Connect (e.g., "noUserInput" or URL failure).

  • false: playUrl request was generated by the bot.

VoiceAI Connect Enterprise supports the selfGenerated attribute from Version 3.10 and later.

Upon play URL failure, in the case where playUrlFailureHandling is notify-bot, the following notification is sent to bot:

AudioCodes Bot API

The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

{
  "type": "event",
  "name": "playUrlFailed",
  "value": {
    "reason": "Invalid URL",
    "playUrlUrl": "http://sip-linux:3006/promptfile", 
    "selfGenerated": false
  }
}
Microsoft Bot Framework

The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

{
  "type": "event",
  "name": "playUrlFailed",
  "value": {
    "reason": "Invalid URL",
    "playUrlUrl": "http://sip-linux:3006/promptfile", 
    "selfGenerated": false
  }
}
Microsoft Copilot Studio

The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

{
  "name": "playUrlFailed",
  "type": "event",
  "value": {
    "playUrlUrl": "http://sip-linux:3006/promptfile",
    "reason": "Invalid URL: blablabla",
    "selfGenerated": false
  }
}
Microsoft Copilot Studio legacy

The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

{
    "name": "playUrlFailed",
    "type": "event",
    "value": {
        "playUrlUrl": "http://sip-linux:3006/promptfile",
        "reason": "Invalid URL: blablabla",
        "selfGenerated": false
    }
}
Dialogflow CX
The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

"queryInput": {
        "event": {
            "event": "playUrlFailed"
        },
        "languageCode": "en-US"
    },
    "queryParams": {
        "parameters": {
            "fields": {
                "event-playUrlFailed": {
                    "kind": "structValue",
                    "structValue": {
                        "fields": {
                            "playUrlUrl": {
                                "kind": "stringValue",
                                "stringValue": "https://example.com/my-file.wav"
                            },
                            "reason": {
                                "kind": "stringValue",
                                "stringValue": "Invalid URL: blablabla"
                            },
                            "selfGenerated": {
                                "kind": "boolValue",
                                "boolValue": "false"
                            }
                        }
                    }
                }
            }
        },
        "sentimentAnalysisRequestConfig": {
        }
    },
Dialogflow ES

The notification is sent as a playUrlFailed event activity, with the fields inside the value field.

For example:

"queryInput": {
        "event": {
            "languageCode": "en-US",
            "name": "playUrlFailed",
            "parameters": {
                "fields": {
                    "playUrlUrl": {
                        "kind": "stringValue",
                        "stringValue": "https://example.com/my-file.wav"
                    },
                    "reason": {
                        "kind": "stringValue",
                        "stringValue": "Invalid URL: blablabla"
                    },
                    "selfGenerated": {
                        "kind": "boolValue",
                        "boolValue": "false"
                    }
                }
            }
        }
    },