Page 1 of 1

Get values when call disconnected by the user

Posted: Mon Mar 05, 2007 2:18 pm
by Brad@emsfirelaw.com
Hi

Please help me to sort out the problem to post the variables when user disconnect the call without pressing any number.

Thanks

Here is the VXML script:



<?xml version="1.0" ?>

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">

<catch event="error.badfetch">
<prompt> Good Bye</prompt>
<!-- bevocal:disconnect / -->
<exit />
</catch>
<!-- for caller Id -->
<var name="teleNO1" expr="session.telephone.ani" />
<!-- for called Id -->
<var name="teleNO2" expr="session.telephone.dnis" />
<script>
var CallerId =teleNO1;
var calledId=teleNO2;
</script>

<nomatch>
<submit next="http://www.testing.com/VXML/GetVXML.aspx" enctype="multipart/form-data" namelist="CallerId calledId" method="post" />
</nomatch>

<noinput>

<submit next="http://www.testing.com/VXML/GetVXML.aspx" enctype="multipart/form-data" namelist="CallerId calledId" method="post" />
</noinput>

<form>
<property name="timeout" value="4s"/>
<field name="pin1" >
Enter one through nine
<grammar type="application/x-nuance-gsl" mode="dtmf">
OneDigit (Digit)
Digit [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0]
</grammar>
</field>
<block>

<submit next="http://www.testing.com/VXML/GetVXML.aspx" enctype="multipart/form-data" namelist="CallerId calledId pin1" method="post" />
</block>
</form>
</vxml>

IVR grammar

Posted: Mon Mar 05, 2007 4:12 pm
by support
You should first correct your IVR grammar. It's currently specified in the proprietary Nuance GSL format. You'll have to rewrite it as SRGS. Alternatively, you could dispense with explicitly stating the IVR grammar and, instead, use a VoiceXML standard builtin IVR grammar that is specified in the <field> tag like this:

Code: Select all

<field name="pin1" type="digits?length=1">
Once that's out of the way, you should add in a <catch> tag for disconnect events which'll look like this:

Code: Select all

<catch event="connection.disconnect">[put your executable code here]</catch>