Below is the code. I appreciate any assistance you can provide.
For a call that reaches the disconnect tag, the data logged to the database is complete (Start|addData1|addData2|addData3|input|addData4|addData5|disconnect), but for a call with a hang up at the prompt for input, the data logged to the database is not complete (Start|connection.disconnect). The log messages for both types of calls are:
Complete log messages
application.StepData= Start
application.StepData= Start|addData1
application.StepData= Start|addData1|addData2
application.StepData= Start|addData1|addData2|addData3
application.StepData= Start|addData1|addData2|addData3|input
application.StepData= Start|addData1|addData2|addData3|input|addData4
application.StepData= Start|addData1|addData2|addData3|input|addData4|addData5
application.StepData= Start|addData1|addData2|addData3|input|addData4|addData5|disconnect
application.StepData= Start|addData1|addData2|addData3|input|addData4|addData5|disconnect|connection.disconnect
Hang up at the input prompt the log messages
application.StepData= Start
application.StepData= Start|addData1
application.StepData= Start|addData1|addData2
application.StepData= Start|addData1|addData2|addData3
application.StepData= Start|connection.disconnect
Start.xml
-----------
<?xml version="1.0"?>
<vxml version="2.0">
<script>
function GetFormattedDateTime()
{
var dt = new Date();
var dtstring = dt.getFullYear()
+ '-' + (dt.getMonth()+1)
+ '-' + dt.getDate()
+ ' ' + dt.getHours()
+ ':' + dt.getMinutes()
+ ':' + dt.getSeconds();
return dtstring;
}
</script>
<var name="startTime" expr="GetFormattedDateTime()" />
<var name="endTime" />
<var name="url" expr="'
http://x.x.x.x/myloggingpage.aspx?'" />
<var name="Process" />
<var name="IVRCallData" expr="session.id+'^'+session.telephone.ani+'^'+session.telephone.dnis" />
<var name="StepData" expr="'Start'"/>
<form>
<block>
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<log label="mylog">Goto Child.xml</log>
<goto next="Child.xml"/>
</block>
</form>
<!-- Catch events -->
<catch event="connection.disconnect">
<assign name="application.StepData" expr="application.StepData+'|connection.disconnect'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<assign name="endTime" expr="GetFormattedDateTime()" />
<assign name="Process" expr="'IVRLogCallData'" />
<assign name="IVRCallData" expr="IVRCallData+'^'+startTime+'^'+endTime+'^'+application.StepData" />
<submit expr="url" namelist="Process IVRCallData"/>
</catch>
</vxml>
Child.xml
------------
<?xml version="1.0"?>
<vxml version="2.0" application="Start.xml">
<form>
<block>
<prompt>This is a test application.</prompt>
<assign name="application.StepData" expr="application.StepData+'|addData1'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Appended data one</prompt>
</block>
<block>
<assign name="application.StepData" expr="application.StepData+'|addData2'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Appended data two</prompt>
</block>
<block>
<assign name="application.StepData" expr="application.StepData+'|addData3'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Appended data three</prompt>
</block>
<subdialog name="custID" src="#customerIDForm" />
<block>
<if cond="custID.response==0">
<assign name="application.StepData" expr="application.StepData+'|noInput'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>You did not provide input</prompt>
<else/>
<assign name="application.StepData" expr="application.StepData+'|input'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Thank you for the input</prompt>
</if>
</block>
<block>
<assign name="application.StepData" expr="application.StepData+'|addData4'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Appended data four</prompt>
</block>
<block>
<assign name="application.StepData" expr="application.StepData+'|addData5'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
<prompt>Appended data five</prompt>
</block>
<block>
<assign name="application.StepData" expr="application.StepData+'|disconnect'" />
<log label="mylog">application.StepData= <value expr="application.StepData"/></log>
Going to disconnect. Good bye.
<disconnect/>
</block>
</form>
<form id="customerIDForm">
<property name="inputmodes" value="dtmf"/>
<property name="termmaxdigits" value="true"/>
<property name="interdigittimeout" value="3s"/>
<!-- Prompt for input -->
<field name="customerid" type="digits?minlength=7">
<prompt>
Please enter your account number.
</prompt>
<nomatch>
<goto next="#customerIDForm" />
</nomatch>
<noinput>
You did not enter anything.
<goto next="#customerIDForm" />
</noinput>
</field>
<!-- Repeat back-->
<block>
<prompt>
You entered
<say-as type="number:digits">
<value expr="customerid.replace(/(.)/g, '$1, ')" />
</say-as>
</prompt>
<assign name="response" expr="customerid" />
</block>
<!-- Confirm -->
<field name="OK" type="boolean">
<prompt>
If this is correct, press one, if not, press two.
</prompt>
<filled>
<if cond="OK==false">
<goto next="#customerIDForm" />
</if>
</filled>
<nomatch>
<goto next="#customerIDForm" />
</nomatch>
</field>
<!-- Success -->
<block>
<return namelist="response"/>
</block>
</form>
</vxml>