I have a index.vxml file like the one showed below which contains questions whose answers are submitted to a saveResponses.php file at the end of the survey; however, some callers may hang up before they get to the end and I need to save their answers when they hang up; I am using <catch event="connection.disconnect"> but iit seems it is not executing <submit> can you please tell how to correctly submit variables to be saved when callers hang up.
Tony
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE vxml SYSTEM "http://plumvoiceportals.com/vxml-260.dtd">
<vxml xml:lang="es-MX" version="2.0" >
<noinput>
<prompt>
<speak xml:lang="es">
Lo siento, no pude oírle.
</speak>
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt>
<speak xml:lang="es">
Lo siento, no le entiendo.
</speak>
</prompt>
<reprompt/>
</nomatch>
<property name="sensitivity" value="0.0"/>
<var name="qCustomerId" expr="'ID-GOES-HERE'"/>
<var name="qb1_Contractor" expr="0"/>
<var name="qb2_Change" expr="0"/>
<var name="qb2a_Description" expr="0"/>
<var name="q3TrabajoConstruccion" expr="0"/>
<form id="wfvt_survey">
<subdialog name="qb1_dlog" src="yesno.vxml">
<param name="confirm_prompt" expr="some question'"/>
<filled>
<assign name="qb1_Contractor" expr="qb1_dlog.response"/>
</filled>
</subdialog>
<subdialog name="qb2_dlog" src="yesno.vxml">
<param name="confirm_prompt" expr="'some question'"/>
<filled>
<assign name="qb2_Change" expr="qb2_dlog.response"/>
</filled>
</subdialog>
<subdialog name="qb2a_Description_dlog" src="audio.vxml" cond="qb2_Change == '1'">
<param name="confirm_prompt"
expr="'some description question.'"/>
<filled>
<assign name="qb2a_Description" expr="qb2a_Description_dlog.response"/>
</filled>
</subdialog>
<subdialog name="q3_dlog" src="yesno.vxml">
<param name="confirm_prompt" expr="'¿Trabajó en construcción.?'"/>
<filled>
<assign name="q3TrabajoConstruccion" expr="q3_dlog.response"/>
<if cond="q3TrabajoConstruccion=='1'">
</filled>
</subdialog>
<catch event="connection.disconnect.hangup">
<submit next="saveResponses.php" namelist="qCustomerId , fullname , time_of_call , qb1_Contractor , qb2_Change , qb2a_Description , q3TrabajoConstruccion" method="post" enctype="multipart/form-data"/>
<exit/>
</catch>
</form>
</vxml>