Page 1 of 1
Save mesage on disconnect
Posted: Mon May 14, 2007 3:20 pm
by brent.russell
On disconnect I am trying to save a message that a user was leaving. Normaly the user presses pound and the message gets sent. If they do not press pound and just hang up... the message does not get sent. after adding the following code... index.php was not accessed. Can you please help me with this problem?
<form id="record_greeting">
<record name="voice_message" maxtime="120s" dtmfterm="true" beep="true" type="audio/x-wav" finalsilence="4000ms">
<prompt>pplease leave a message, press pound when done
</prompt>
</record>
<filled>
<if cond="conf==2">
<clear namelist="voice_message conf"/>
<goto next="#record_greeting"/>
<elseif cond="conf=='#'"/>
<goto next="#hangUp"/>
<else/>
<prompt><audio src="
http://usbal.ivr.mobilemessenger.com/vo ... Delivering your message</audio></prompt>
</if>
</filled>
</field>
Later on in the script I added this catch event.....
<catch event="connection.disconnect.hangup">
<submit name="sendOnDisconnect" namelist="voice_message phone_number source ivr_user_name ivr_password request_type" next="
http://usbal.ivr.mobilemessenger.com/index.php" method="post" />
</exit>
</catch>
Posted: Mon May 14, 2007 3:30 pm
by brent.russell
I tried a few other things. I included all of the code below. One thing I tried is added the catch tag in many places however this was not working.
However... if I test it by not hanging up the phone after recording, it all works fine.
Code: Select all
<var name="phone_number" expr="application.GVphone"/>
<var name="source" expr="'ivr'" />
<var name="ivr_user_name" expr="'XXX'" />
<var name="ivr_password" expr="'XXX'" />
<var name="request_type" expr="'callback'" />
<form id="record_greeting">
<!-- the resulting recording is stored in the variable voice_message -->
<record name="voice_message" maxtime="120s" dtmfterm="true" beep="true" type="audio/x-wav" finalsilence="4000ms">
<prompt>
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US15.mp3">At the tone, please record your message. When you're done, press pound.</audio>
</prompt>
<catch event="connection.disconnect.hangup">
<submit name="sendOnDisconnect3" namelist="voice_message phone_number source ivr_user_name ivr_password request_type" next="http://usbal.ivr.mobilemessenger.com/index.php" method="post" />
</exit>
</catch>
<!-- if the user doesn't say anything
within finalsilence, catch the noinput -->
<noinput count="1">
<reprompt/>
</noinput>
<noinput count="2">
<reprompt/>
</noinput>
<noinput count="3">
<reprompt/>
</noinput>
<noinput count="4">
<goto next="#hangUp"/>
</noinput>
</record>
<catch event="connection.disconnect.hangup">
<submit name="sendOnDisconnect2" namelist="voice_message phone_number source ivr_user_name ivr_password request_type" next="http://usbal.ivr.mobilemessenger.com/index.php" method="post" />
</exit>
</catch>
<!-- confirm that we should commit the new recording -->
<field name="conf">
<grammar type="application/x-jsgf">1|2|"#"</grammar>
<prompt>
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US21.mp3">Here is your message.</audio>
<break size="small"/>
<audio expr="voice_message"/>
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US16.mp3">
If you are happy with this message press one.
If you would like to re-record your message press two.
Otherwise to cancel recording and disconnect press pound.
</audio>
</prompt>
<noinput count="1">
<reprompt/>
</noinput>
<noinput count="2">
<reprompt/>
</noinput>
<noinput count="3">
<reprompt/>
</noinput>
<noinput count="4">
<goto next="#hangUp"/>
</noinput>
<nomatch count="1">
<prompt>
sorry, that was not one of the choices
</prompt>
<reprompt/>
</nomatch>
<nomatch count="2">
<prompt>
sorry, that was not one of the choices
</prompt>
<reprompt/>
</nomatch>
<nomatch count="3">
<prompt>
sorry, that was not one of the choices
</prompt>
<reprompt/>
</nomatch>
<nomatch count="4">
<prompt>
sorry, that was not one of the choices
</prompt>
<reprompt/>
</nomatch>
<nomatch count="5">
<goto next="#hangUp" />
</nomatch>
<filled>
<if cond="conf==2">
<clear namelist="voice_message conf"/>
<goto next="#record_greeting"/>
<elseif cond="conf=='#'"/>
<goto next="#hangUp"/>
<else/>
<prompt><audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US17.mp3">Delivering your message</audio></prompt>
</if>
</filled>
</field>
<!-- submit the data to the server -->
<subdialog fetchtimeout="70" name="oResult" src="http://usbal.ivr.mobilemessenger.com/index.php"
namelist="voice_message phone_number source ivr_user_name ivr_password request_type" method="post" fetchaudio="http://usbal.ivr.mobilemessenger.com/voice_overs/unsubscribing.mp3">
<filled>
<if cond="oResult.code">
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US18.mp3">Your message has been succesfully delivered</audio>
<else/>
<prompt>
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/US19.mp3">Our system is having difficulties processing your request at this time. Please call our live customer support on</audio>
one eight hundred, two two two, three three four five.
</prompt>
<log><value expr="oResult.msg"/></log>
</if>
</filled>
</subdialog>
</form>
<form id="hangUp">
<block>
<audio src="http://usbal.ivr.mobilemessenger.com/voice_overs/VO1_.mp3">
Thank you for calling the Mobile Content help desk. Goodbye.
</audio>
<disconnect/>
<exit/>
</block>
</form>
<catch event="connection.disconnect.hangup">
<submit name="sendOnDisconnect" namelist="voice_message phone_number source ivr_user_name ivr_password request_type" next="http://usbal.ivr.mobilemessenger.com/index.php" method="post" />
</exit>
</catch>
</vxml>
User IVR code received parse error in script
Posted: Mon May 14, 2007 4:13 pm
by support
Brent,
Catch blocks like this should only be placed at the form level (i.e. same level as the record tag itself). The other
<catch> blocks (at the
<record> level and at the document level) should be removed.
We ran your IVR code (which had several other syntax errors that needed to be fixed first) and received the following parse error in the IVR script to which the data was submitted:
Code: Select all
DocumentParser::FetchDocument - Parse error in file "http://usbal.ivr.mobilemessenger.com/index.php", line 1, column 1 - The main XML document cannot be empty
errno: 205 uri http://usbal.ivr.mobilemessenger.com/index.php
This indicates that the
submit of the audio data is happening correctly, and there is some other IVR error in your PHP script.
Regards,
Plum Support
Posted: Mon May 14, 2007 4:16 pm
by brent.russell
yeah... the password is incorrect. so it will not return properly. However this does help a little thank you. I have noticed that is is supposed to be pointing to
http://usbal.ivr.mobilemessenger.com/test/index.php
instead of
http://usbal.ivr.mobilemessenger.com/index.php
thank you,
Brent