Page 1 of 1
Divine Application vs. User Disconnect
Posted: Wed Mar 04, 2009 10:53 pm
by hct

Plum folks,
Is there a way to divine the cause for the disconnect? I had used other platforms before where you could get either an '
application' or '
user' termination flag at the end of the call. '
Application' was where the call ran to completion, or suffered an error, and '
user' was a hangup or carrier interruption. Is this possible here? Our outbound application is quite long and we would like to see if people cloy and hangup, or take one of myriad program exit paths.
Of course I could add more JS to catch every possible path to disconnect, but are there any
event or
message variables buried in
telephone.disconnect and
error, that may help here? Thanks.
-Joseph
Using IVR application to catch hangups
Posted: Thu Mar 05, 2009 11:23 am
by support
Hi Joseph,
Yes, there are ways to
catch certain hangup events. For IVR example, if you want to catch when the user hangs up, you would do the following:
Code: Select all
<catch event="connection.disconnect.hangup">
<prompt>Caught a hangup by the user.</prompt>
</catch>
The other type of connection.disconnect is a "connection.disconnect.transfer", when the user has been transferred unconditionally to another line and will not return.
For more information on what other events you can catch within your IVR application, see here:
http://www.w3.org/TR/voicexml20/#dml5.2.2
Hope this helps.
Regards,
Plum Support
Posted: Thu Mar 05, 2009 1:31 pm
by hct
Thanks, but this does not quite satiate what is sought.
Code: Select all
<!--USER HANGUP-->
<catch event="telephone.disconnect.hangup">
<assign name="prog_Terminate_Status" expr="'user_hangup'"/>
...
</catch>
<!--USER TRANSFER-->
<catch event="telephone.disconnect.transfer">
<assign name="prog_Terminate_Status" expr="'user_transfer'"/>
...
</catch>
<!--USER HANGUP/TRANSFER/APP END-->
<catch event="telephone.disconnect">
<assign name="prog_Terminate_Status" expr="'application_end'"/>
...
</catch>
The above code example will always throw the third block during any termination of the application due to the error prefix hierarchy. We seek to differentiate between all three types. We could forgo the telephone.disconnect catch a single disconnect (i.e. hangup), but we need to have a <DATA> element sent on cessation for all cases, so we would need all disconnect type tags. The <EXIT> tag could be used everywhere else to catch application exits, but our 7 scripts total 11,000 lines and would be a massive rework to find every application exit point. Any other possibilities in the platform to elucidate this information? Beyond our unique requirements however, I think the below would work for most people.
Code: Select all
<!--Catch Two Types of Disconnect Events-->
<!--USER HANGUP-->
<catch event="telephone.disconnect.hangup">
<assign name="prog_Terminate_Status" expr="'user_hangup'"/>
...
</catch>
<!--USER TRANSFER-->
<catch event="telephone.disconnect.transfer">
<assign name="prog_Terminate_Status" expr="'user_transfer'"/>
...
</catch>
<!--APPLICATION END-->
<catch event="exit">
<assign name="prog_Terminate_Status" expr="'application_end'"/>
...
</catch>
<!--App Exit Intentionally-->
<form id="foo_form">
<block>
...
Thank You and Goodbye.
<exit/>
</block>
</form>
Clarification of using IVR application to catch hangups
Posted: Thu Mar 05, 2009 6:06 pm
by support
Hi,
About your initial post, there is an explicit "message" attribute that you can use with the IVR tag,
<throw>, that might help you.
Sorry for not mentioning this IVR app earlier.
Regards,
Plum Support
Posted: Fri Mar 13, 2009 10:47 am
by hct
Thanks for the <throw> tip. I had not wanted to go through the effort, but did any way. Below is how we tracked application or user termination. The user is easy to catch and thus the default. However, if the application would normally call the <disconnect/> tag, we now call <throw event="app_end"/> to store an application end state. Finally, we catch the other two ways to get thrown out by the platform which are a <nomatch> failout and a <noinput> failout.
This example also replaces the default English failouts with Spanish based on the current application language selected.
Plum Support, are there any other platform disconnect points that occur by default beyond <nomatch> and <noinput>?
Code: Select all
<!--How did call terminate - default to user-->
<var name="prog_Terminate_Status" expr="'user'"/>
<var name="prog_Language" expr="'spanish'"/>
<!--Return data to server - ended interaction-->
<var name="data_trans" expr="false"/>
<!-- Catch on user based disconnect event (hangup)-->
<catch event="telephone.disconnect">
<!-- Pack up all collected parameters and do a <DATA> submission-->
<assign name="data_trans" expr="true"/>
<data maxstale="0" name="callStatistics" src="http://myurl.com/.../.php" method="post" namelist="prog_Terminate_Status"/>
<exit/>
</catch>
<!-- Unable to transmit to server - retry-->
<catch event="error.badfetch" cond="data_trans">
<!--Retry on failure until success or disconnect timeout-->
<data maxstale="0" name="callStatistics" src="http://myurl.com/.../.php" method="post" namelist="prog_Terminate_Status"/>
</catch>
<!--Catch Application Disconnects-->
<catch event="app_end">
<assign name="prog_Terminate_Status" expr="'application'"/>
<disconnect/>
</catch>
<!--Catch Platform Disconnects-->
<catch event="nomatch" count="4">
<!--At forth no match, apologize and end-->
<if cond="prog_Language=='english'">
<prompt>
I'm sorry, I just can't understand you. Good bye.
</prompt>
<else/>
<!--Spanish-->
<prompt>
<voice xml:lang="es-us" name="rosa">
Lo siento. No puedo entenderte. Adiós.
</voice>
</prompt>
</if>
<assign name="prog_Terminate_Status" expr="'nomatch'"/>
<!--Disconnect-->
<disconnect/>
</catch>
<!--Catch Platform Disconnects-->
<catch event="noinput" count="4">
<!--At forth no input, apologize and end-->
<if cond="prog_Language=='english'">
<prompt>
I'm sorry, I just can't understand you. Good bye.
</prompt>
<else/>
<!--Spanish-->
<prompt>
<voice xml:lang="es-us" name="rosa">
Lo siento. No puedo entenderte. Adiós.
</voice>
</prompt>
</if>
<assign name="prog_Terminate_Status" expr="'noinput'"/>
<!--Disconnect-->
<disconnect/>
</catch>
Disconnect points for an IVR application
Posted: Fri Mar 13, 2009 3:09 pm
by support
Hi,
Other than IVR errors that might occur (i.e. error.badfetch),
<noinput> and
<nomatch> are the only other disconnect points for an IVR application (other than the application end).
Regards,
Plum Support