Audiocodes: Identifying call disconnect events

For Voice Use-cases, it's important to understand the behavior of the conversation is different to chat based conversations. Unlike most chat channels, there is a distinctive event that occurs when a conversation ends - the disconnection of the call! 

This event can be triggered by either the bot or the user. If the bot disconnects the call, it is because the conversation reached a point in its design where the it was intentional for the call to end: e.g. 

"I'm glad I could solve your problem today. Thanks for calling." <Call ends>.

However, on the contrary, the caller can end the call at any time during the conversation without warning. This means our flows need to be aware of when the event occurs as a best practice so we can track the event as part of the chatbot analytics and view it in the Cognigy Insights Step Explorer or record it as goal.

Recommended Approach

The event received when a caller disconnects the call is sent to the flow as a data message. The data format is the following:


This data is received by the flow under the input data object available in cognigyscript as: 


In order to detect this event at any time during a conversation, the recommended approach is to add an intent that recognizes this event from a javascript rule, rather than having machine learning example sentences. In order have this intent available throughout the entire conversation, it should be present in a flow that is attached to all other flows. We can be recommended to use a "Helper flow" that contains this intent along with any other intents that also need to be accessed anywhere in your flow (e.g. human handover intent).


The intent rule contains the following expression: == "disconnect"

You can also create a "Hangup" intent rule with the following expression: == "hangup"

By using the "helper flow" approach, your analytics data will be much tidier from the perspective that each time this intent is triggered you can end the call with the associated intent step and if necessary, perform a flow execution to overwrite odata analytics records with other conversation parameters.

Warning: The data object must be undefined in an Audiocodes Transformer for the Intent Rules to function.



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful