I have some code snippets early in this post, but that might have been misleading. Here's the entire script:
<?xml version="1.0"?>
<!DOCTYPE vxml SYSTEM "
http://vxml.plumgroup.com/vxml.dtd">
<vxml version="2.0" xmlns="
http://www.w3.org/2001/vxml">
<!-- allow barge-in from dtmf -->
<property name="bargein" value="dtmf" />
<!-- dtmf only is recongized, not speech -->
<property name="inputmodes" value="dtmf" />
<var name="ANI" expr="'_XO_WIN_PHONE_'" />
<var name="DNIS" expr="0"/>
<!-- vars for names -->
<var name="fromname" expr="'_NAME1_'" />
<var name="toname" expr="'_NAME2_'" />
<!--
- Create handler to do post-call processing triggered by <disconnect>
- report back with call times and result via the subdialog tag
-->
<var name="timestart" expr="new Date()" />
<var name="timeend" expr="new Date()" />
<var name="timelen" expr="0" />
<var name="xferstart" expr="0" />
<var name="xferend" expr="0" />
<var name="xferresult" expr="'nocall'" />
<var name="xferduration" expr="0" />
<var name="bNotified" expr="0" />
<var name="errmsg" expr="'none'" />
<catch event="telephone.disconnect.hangup" >
<!-- The following conditional is a workaround to catch a near_end_disconnect during blocking transfer -->
<if cond="document.xferstart != 0">
<assign name="document.xferresult" expr="'near_end_disconnect'" />
<assign name="document.xferend" expr="new Date()" />
<assign name="document.xferduration" expr="document.xferend.getTime() - document.xferstart.getTime()" />
</if>
<goto next="#NotifyWIN" />
</catch>
<catch event="error" >
<assign name="document.errmsg" expr="_message" />
<goto next="#NotifyWIN" />
</catch>
<!-- Start of call -->
<form id="MainPrompt">
<!--
Only accept 1 or 2 - any other key will cause re-prompting.
-->
<field name="ConfirmMenu" type="boolean?y=1;n=2">
<prompt>
<emphasis>Hello.</emphasis>This is Zo-Go calling to connect you to
<prosody rate="default"><say-as type="name"> <value expr="document.toname" /> </say-as></prosody>.
<prosody rate="default">To connect, press 1. To disconnect, press 2.</prosody>
</prompt>
</field>
<noinput>
<audio>Are you there? </audio>
<reprompt/>
</noinput>
<noinput count="2">
<audio>I did not hear you.</audio>
<reprompt/>
</noinput>
<noinput count="3">
<goto next="#SaySorry" />
</noinput>
<nomatch>
<reprompt/>
</nomatch>
<nomatch count="3">
<goto next="#SayWhat" />
</nomatch>
<!--
Any response other than 1 or 2 will cause re-prompting. No answer or a busy signal
will not get here, so if 1, we try to connect the second call; if 2, we reject the attempt.
Note that we set the xferresult variable at document scope, otherwise it is local scope and lost.
-->
<filled>
<if cond="ConfirmMenu == '1'">
<goto next="#TryConnect" />
<else/>
<assign name="document.xferresult" expr="'rejected'" />
<goto next="#SayGoodbye" />
</if>
</filled>
</form>
<!-- Dial out to 2nd caller -->
<form id="TryConnect">
<block>
<audio> Connecting now. </audio>
<assign name="document.xferstart" expr="new Date()" />
</block>
<transfer name="T_1" dest="tel:+1_TO_';ani=_XO_WIN_PHONE_" bridge="true" cond="true" connecttimeout="60s" maxtime="_CALLDURATION_s" />
<filled>
<assign name="document.xferresult" expr="T_1" />
<assign name="document.xferduration" expr="T_1$.duration" />
<goto next="#SayGoodbye" />
</filled>
</form>
<!-- Say Goodbye to caller -->
<form id="SayGoodbye">
<block>
<audio> Thanks for using Zo-Go. Goodbye. </audio>
<goto next="#NotifyWIN" />
</block>
</form>
<!-- Cannot hear caller -->
<form id="SaySorry">
<block>
<audio> I did not hear any response. Please try again later. </audio>
<goto next="#SayGoodbye" />
</block>
</form>
<!-- Cannot understand caller -->
<form id="SayWhat">
<block>
<audio> I cannot understand you. Please try again later. </audio>
<goto next="#SayGoodbye" />
</block>
</form>
<!-- Call Post Processing: Notify WIN of results -->
<form id="NotifyWIN">
<!-- Contact WIN system with results -->
<block>
<assign name="document.timeend" expr="new Date()" />
<assign name="document.timelen" expr="document.timeend.getTime() - document.timestart.getTime()" />
<if cond="document.bNotified == 1">
<goto next="#Done" />
</if>
</block>
<var name="reqid" expr="_REQID_" />
<var name="from" expr="'_FROM_'" />
<var name="to" expr="'_TO_'" />
<subdialog src="_SVC_CALL_RESULTURL_" maxage="0" method="post" namelist="document.errmsg document.xferduration document.xferresult document.timelen from to reqid" />
<filled>
<assign name="document.bNotified" expr="1" />
<goto next="#Done" />
</filled>
</form>
<!-- End of script -->
<form id="Done">
<!-- end of script: do nothing -->
</form>
</vxml>
Note that before execution, capitalized variables that begin and end with an underscore are replaced on a call-by-call basis. While reviewing this post, I notice that indentation has been removed, for which I apologize.
We really do appreciate your taking the time to help us with this. I fully expect this to be something in our script, but I just can't see what.
Dorsey