Send call data after hangup
Posted: Wed Oct 08, 2014 10:54 am
Our VXML script only sends the call only when the call is completed. In other words, the caller has to go thru all prompts for the call data to be sent to our web service. How can we catch every call, whether the user goes thru all prompts? We would like to catch the caller id for every call, even if the caller hangs up immediately after call is placed and received.
Here is my code:
Thanks for any help you can provide for us.
-Hector
Here is my code:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<var name="CallerID" expr="session.telephone.ani" />
<var name="CalledID" expr="session.telephone.dnis" />
<var name="Lang" expr="'EN'" />
<var name="AgencyID" />
<property name="inputmodes" value="dtmf"/>
<property name="interdigittimeout" value="3s"/>
<form id="FirstPart">
<block>
<if cond="CalledID==3999">
<assign name="AgencyID" expr="346"/>
<elseif cond="CalledID==8888"/>
<assign name="AgencyID" expr="346"/>
<else/>
<assign name="AgencyID" expr="346"/>
</if>
<prompt>
<audio src="wavfiles/eng1.mp3">
Welcome to Visit Clock.
</audio>
</prompt>
</block>
<field name="ProviderID" type="digits">
<prompt>
<audio src="wavfiles/eng2.mp3">
Please enter your employee ID using the keypad.
</audio>
</prompt>
<filled>
<if cond="ProviderID.length == 5">
<assign name="ProvID" expr="ProviderID"/>
<!-- You entered <value expr="ProviderID"/>. -->
<goto nextitem="id"/>
<else/>
<audio src="wavfiles/engInvalid.mp3">
Invalid ID number. Please try again.
</audio>
<clear namelist="ProviderID"/>
<reprompt/>
</if>
</filled>
</field>
<field name="id" type="digits">
<prompt>
<audio src="wavfiles/eng3.mp3">
Please enter the client number using the keypad.
</audio>
</prompt>
<filled>
<assign name="ClientID" expr="id"/>
</filled>
<noinput>
<assign name="ClientID" expr="0"/>
<goto nextitem="submit"/>
</noinput>
</field>
<block name="submit">
<submit namelist="AgencyID CallerID ProviderID ClientID Lang" next="http://www.ourwebsite.com/Call.ashx" />
</block>
</form>
</vxml>
-Hector