Page 1 of 1

catching disconnect / getting "unexpected jump to dialog"

Posted: Tue Nov 15, 2011 12:28 pm
by magicsoft
I have times when I want to catch a disconnect event so I can do some processing on the server when the person hangs up before I got to a certain point (code below).

After the #MACHINECLOSING# prompt is played, I'm then getting a "unexpected jump to dialog" error and/or a "Max Disconnect Count Exceeded". I'm assuming this is because the call is disconnecting because I've reached the end of my script, but then I'm catching this disconnect with the "catch".

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0" application="call_root.vxml">

	<form id="machine">
		<block>
			<prompt bargein="false">
				<audio src="#INTRO#"></audio>
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				#FULLDATE#
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				<audio src="#REMINDER#"></audio>
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				<audio src="#LOCATION#"></audio>
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				<audio src="#ARRIVEAT#"></audio>
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				#FULLTIME#
			</prompt>
		</block>
		
		<block>
			<assign name="varPersonAnswered" expr="'no'"/>
			<assign name="varCallSuccessful" expr="'yes'"/>
			<assign name="varPaperworkReceived" expr="'no'"/>
			<assign name="varIntention" expr="'no'"/>
		</block>
		
		<subdialog name="enterdata" namelist="varJobGUID varCallSuccessful varPersonAnswered varPaperworkReceived varIntention" src="enterdata_confirmation.ashx"/>

		<block>
			<prompt bargein="false">
				#COPAY#
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				<audio src="#INSURANCE#"></audio>
			</prompt>
		</block>
		<block>
			<prompt bargein="false">
				<audio src="#MACHINECLOSING#"></audio>
			</prompt>
		</block>
		
		<catch event="connection.disconnect.hangup">
			<goto next="#hangup" />
		</catch>

	</form>

	<form id="hangup">
		<block>
			<assign name="varPersonAnswered" expr="'no'"/>
			<assign name="varCallSuccessful" expr="'no'"/>
			<assign name="varPaperworkReceived" expr="'no'"/>
			<assign name="varIntention" expr="'no'"/>
		</block>
		<subdialog name="enterdata" namelist="varJobGUID varCallSuccessful varPersonAnswered varPaperworkReceived varIntention" src="enterdata_confirmation.ashx"/>
	</form>

</vxml>
For what it's worth, I've been testing this whole issue with a scratchpad (below), and I still get the "unexpected jump to dialog", even with this simple script.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0" application="call_root.vxml">

	<form id="machine">
		<block>
			<prompt bargein="true">
				This is my test.  I should hang up now to see if this is fixed.  This is my test.  I should hang up now to see if this is fixed.
			</prompt>
		</block>
	<catch event="connection.disconnect.hangup">
                <goto next="#hangup"/>
	</catch>
		</form>
                <form>
		<block>
			<prompt bargein="true">
				This is the end of the call.
			</prompt>
		</block>

	</form>
<form id="hangup">
</form>


</vxml>

Re: catching disconnect / getting "unexpected jump to dialog

Posted: Tue Nov 15, 2011 5:29 pm
by support
Hi Andrew,

In order to do post-call processing, you must <goto> a separate page that will handle the processing, instead of a <form> in the same document.

For more information and an example, please take a look at this previous post: http://support.plumgroup.com/viewtopic. ... 174&p=8510

Regards,
Plum Support