Page 1 of 1

new problem with catching disconnect

Posted: Fri Nov 18, 2011 1:01 pm
by magicsoft
Okay, I seem to have solved my other issues with the errors in my previous post, however, I am still having trouble processing a disconnect. For some reason, the disconnect event is not even being thrown now. I'm hanging up while it's playing the "FULLDATE" prompt, but It continues on and tries to play all the other prompts in the script (including the assigning of variables, which really messes up my results), then just hangs up on its own at the end, never hitting my catch event. I even tried putting the catch in my "call_root_confirmation.vxml" document, and I also tried putting it in several places in the below code, including outside all the "form" tags. No matter what, it acts as though it never catches the event and continues to try to play all the prompts, even though the log clearly shows that it knows the line has been disconnected.

Anderw

Code: Select all

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

	<form id="firstassign">
		<block>
			<assign name="varPersonAnswered" expr="'no'"/>
			<assign name="varCallSuccessful" expr="'no'"/>
			<assign name="varPaperworkReceived" expr="'none'"/>
			<assign name="varIntention" expr="'none'"/>
			<goto next="#intro"/>
		</block>
	</form>
	<form id="intro">
		<block>
			<prompt bargein="false">
				<audio src="#INTRO#"></audio>
			</prompt>
			<goto next="#fulldate"/>
		</block>
	</form>
	<form id="fulldate">
		<block>
			<prompt bargein="false">
				#FULLDATE#
			</prompt>
			<goto next="#reminder"/>
		</block>
		<catch event="connection.disconnect.hangup">
			<log label="mylog">I AM IN THE CATCH EVENT</log>
			<submit next="enterdata_confirmation.ashx" namelist="varJobGUID varCallSuccessful varPersonAnswered varPaperworkReceived varIntention" method="post" />
			<exit/>
		</catch>
	</form>
	<form id="reminder">
		<block>
			<prompt bargein="false">
				<audio src="#REMINDER#"></audio>
			</prompt>
			<goto next="#location"/>
		</block>
	</form>
	<form id="location">
		<block>
			<prompt bargein="false">
				<audio src="#LOCATION#"></audio>
			</prompt>
			<goto next="#secondassign"/>
		</block>
	</form>
	<form id="secondassign">
		<block>
			<assign name="varPersonAnswered" expr="'no'"/>
			<assign name="varCallSuccessful" expr="'yes'"/>
			<assign name="varPaperworkReceived" expr="'none'"/>
			<assign name="varIntention" expr="'none'"/>
			<goto next="#arriveat"/>
		</block>
	</form>
	<form id="arriveat">
		<block>
			<prompt bargein="false">
				<audio src="#ARRIVEAT#"></audio>
			</prompt>
			<goto next="#fulltime"/>
		</block>
	</form>
	<form id="fulltime">
		<block>
			<prompt bargein="false">
				#FULLTIME#
			</prompt>
			<goto next="#copay"/>
		</block>
	</form>
	<form id="copay">
		<block>
			<prompt bargein="false">
				#COPAY#
			</prompt>
			<goto next="#insurance"/>
		</block>
	</form>
	<form id="insurance">
		<block>
			<prompt bargein="false">
				<audio src="#INSURANCE#"></audio>
			</prompt>
			<goto next="#machineclosing"/>
		</block>
	</form>
	<form id="machineclosing">
		<block>
			<prompt bargein="false">
				<audio src="#MACHINECLOSING#"></audio>
			</prompt>
		</block>
	</form>

</vxml>

Code: Select all

Fri 18 Nov 2011 12:02:03 PM EST:
Call Start Event: ANII 13522741199 DNIS outbound VURL http://us.popproxy.plumgroup.com/plumvp/startpage.php
DocumentParser::FetchDocument()
DocumentParser::FetchDocument(http://us.popproxy.plumgroup.com/plumvp/startpage.php)
Cache Miss: http://us.popproxy.plumgroup.com/plumvp/startpage.php
Attempting to fetch http://us.popproxy.plumgroup.com/plumvp/startpage.php
Click here to view saved VoiceXML script
Entering form = '$_internalName_1436826' form item = '$_internalName_1436827'
VXI::var_element(name="sessionID" expr = "session.id")
DocumentParser::FetchDocument(startpage.php)
Cache Miss: http://us.popproxy.plumgroup.com/plumvp/startpage.php?sessionID=000024%3b010%3b1321635507
Attempting to fetch http://us.popproxy.plumgroup.com/plumvp/startpage.php?sessionID=000024%3b010%3b1321635507
Click here to view saved VoiceXML script
Entering form = '$_internalName_1436829' form item = '$_internalName_1436830'
VXI::var_element(name="callee_type" expr = "'voice'")
VXI::var_element(name="phone_number" expr = "'13522741199'")
VXI::var_element(name="call_id" expr = "'6975572'")
VXI::var_element(name="message_reference" expr = "'4297f385-89cc-43fc-9a31-8de60ebb3f6b'")
VXI::var_element(name="call_parameters" expr = "''")
VXI::var_element(name="campaign_parameters" expr = "''")
DocumentParser::FetchDocument(http://login.sleepcarecenter.com/studycalls/startcall_confirmation.ashx)
Posted form data is URL encoded
Attempting to fetch http://login.sleepcarecenter.com/studycalls/startcall_confirmation.ashx
Click here to view saved VoiceXML script
DocumentParser::FetchDocument(call_root_confirmation.vxml)
Cache Miss: http://login.sleepcarecenter.com/studycalls/call_root_confirmation.vxml
Attempting to fetch http://login.sleepcarecenter.com/studycalls/call_root_confirmation.vxml
Click here to view saved VoiceXML script
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
2
</grammar>
---------
VXI::var_element(name="varJobGUID" expr = "")
VXI::var_element(name="varLanguage" expr = "")
VXI::var_element(name="varFileName" expr = "")
VXI::var_element(name="varPersonAnswered" expr = "")
VXI::var_element(name="varCallSuccessful" expr = "")
VXI::var_element(name="varPaperworkReceived" expr = "")
VXI::var_element(name="varIntention" expr = "")
VXI::var_element(name="varPatient" expr = "")
VXI::var_element(name="varProceed" expr = "")
Entering form = 'answer' form item = '$_internalName_1436832'
VXI::assign_element(name="varPersonAnswered" expr = "'yes'")
VXI::assign_element(name="varCallSuccessful" expr = "'no'")
VXI::assign_element(name="varPaperworkReceived" expr = "'none'")
VXI::assign_element(name="varIntention" expr = "'none'")
Entering form = 'answer' form item = '$_internalName_1436833'
VXI::assign_element(name="varJobGUID" expr = "'4297f385-89cc-43fc-9a31-8de60ebb3f6b'")
Entering form = 'answer' form item = 'answer'
VXI::queue_prompts()
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/confirmations/LanguageOptionEnglish_SleepCare.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/confirmations/LanguageOptionEnglish_SleepCare.mp3
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/confirmations/LanguageOptionEnglish_SleepCare.mp3 added to prompt queue

Fri 18 Nov 2011 12:02:04 PM EST:
Newly queued prompts are now being played
VXI::record_element - activating grammars for form = 'answer' formitem = 'answer'
PromptManager::Play()

Fri 18 Nov 2011 12:02:15 PM EST:
Entering form = 'machine' form item = '$_internalName_1436837'
VXI::assign_element(name="varFileName" expr = "'call_confirmation_machine.vxml'")
VXI::assign_element(name="varLanguage" expr = "'english'")
DocumentParser::FetchDocument(loadconfirmationscript.ashx)
Posted form data is URL encoded
Attempting to fetch http://login.sleepcarecenter.com/studycalls/loadconfirmationscript.ashx
Click here to view saved VoiceXML script
DocumentParser::FetchDocument(call_root_confirmation.vxml)
Cache Miss: http://login.sleepcarecenter.com/studycalls/call_root_confirmation.vxml
Attempting to fetch http://login.sleepcarecenter.com/studycalls/call_root_confirmation.vxml
Click here to view saved VoiceXML script
Entering form = 'firstassign' form item = '$_internalName_1436863'
VXI::assign_element(name="varPersonAnswered" expr = "'no'")
VXI::assign_element(name="varCallSuccessful" expr = "'no'")
VXI::assign_element(name="varPaperworkReceived" expr = "'none'")
VXI::assign_element(name="varIntention" expr = "'none'")
Entering form = 'intro' form item = '$_internalName_1436864'
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/confirmations/english/intro_SleepCare.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/confirmations/english/intro_SleepCare.mp3
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/confirmations/english/intro_SleepCare.mp3 added to prompt queue
Newly queued prompts are now being played
Entering form = 'fulldate' form item = '$_internalName_1436865'
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/general/english/weekdays/wednesday.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/general/english/weekdays/wednesday.mp3

Fri 18 Nov 2011 12:02:16 PM EST:
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/general/english/weekdays/wednesday.mp3 added to prompt queue

Fri 18 Nov 2011 12:02:22 PM EST:
Newly queued prompts are now being played
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/general/english/months/04.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/general/english/months/04.mp3
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/general/english/months/04.mp3 added to prompt queue

Fri 18 Nov 2011 12:02:23 PM EST:
Newly queued prompts are now being played
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/general/english/daysofmonth/25.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/general/english/daysofmonth/25.mp3

Fri 18 Nov 2011 12:02:24 PM EST:
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/general/english/daysofmonth/25.mp3 added to prompt queue

Fri 18 Nov 2011 12:02:25 PM EST:
Newly queued prompts are now being played
bargein set to false
INPUTMODES set to "DTMF"
Cache Miss: http://login.sleepcarecenter.com/studycalls/sounds/general/english/centuries/year2000.mp3
Attempting to fetch http://login.sleepcarecenter.com/studycalls/sounds/general/english/centuries/year2000.mp3
Audio segment from the URL http://login.sleepcarecenter.com/studycalls/sounds/general/english/centuries/year2000.mp3 added to prompt queue

Fri 18 Nov 2011 12:02:26 PM EST:
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'fulldate' form item = '$_internalName_1436866'
Entering form = 'reminder' form item = '$_internalName_1436867'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'location' form item = '$_internalName_1436868'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'secondassign' form item = '$_internalName_1436869'
VXI::assign_element(name="varPersonAnswered" expr = "'no'")
VXI::assign_element(name="varCallSuccessful" expr = "'yes'")
VXI::assign_element(name="varPaperworkReceived" expr = "'none'")
VXI::assign_element(name="varIntention" expr = "'none'")
Entering form = 'arriveat' form item = '$_internalName_1436870'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'fulltime' form item = '$_internalName_1436871'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'copay' form item = '$_internalName_1436872'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'insurance' form item = '$_internalName_1436873'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Entering form = 'machineclosing' form item = '$_internalName_1436874'
Can not queue audio -- line disconnected
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
impl->dxi->waitForPlayEOD() detected a disconnect. Abandoning queued data.
Line disconnect detected. Abandoning queued audio data.
received event: connection.disconnect.hangup:
VXI::exit_element()
Call End Event
Ending session
Ending Session On Channel 10

Re: new problem with catching disconnect

Posted: Fri Nov 18, 2011 4:24 pm
by magicsoft
It seems to catch the event if I do this:

Code: Select all

	<form id="fulldate">
		<field name="dummy">
			<grammar> [(Supercalifragilisticexpialidocious)] </grammar>
			<prompt bargein="false">
				#FULLDATE#
			</prompt>
			<catch event="nomatch noinput">
				<goto next="#reminder"/>
			</catch>
		</field>
	</form>
But this seems like a hack and not the appropriate way to do it. I found something on the internet that said a dummy "field" was required to catch a disconnect. But obviously I'd like to have a field where no grammar will be needed and it just ignores any input.

Your thoughts?

Andrew

Re: new problem with catching disconnect

Posted: Mon Nov 21, 2011 2:55 pm
by support
Hi Andrew,

So we're assuming you only want to catch a hangup during the "fulldate" form, and not at any other points of your application? Your application will have to be split into 2 vxml files like so:

start.vxml

Code: Select all

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

       <form id="firstassign">
          <block>
             <assign name="varPersonAnswered" expr="'no'"/>
             <assign name="varCallSuccessful" expr="'no'"/>
             <assign name="varPaperworkReceived" expr="'none'"/>
             <assign name="varIntention" expr="'none'"/>
             <goto next="#intro"/>
          </block>
       </form>

       <form id="intro">
          <block>
             <prompt bargein="false">
                <audio src="#INTRO#"></audio>
             </prompt>
             <goto next="#fulldate"/>
          </block>
       </form>

       <form id="fulldate">
          <block>
             <prompt bargein="false">
                #FULLDATE#
             </prompt>
             <goto next="remainder.vxml"/>
          </block>
          <catch event="connection.disconnect.hangup">
             <log label="mylog">I AM IN THE CATCH EVENT</log>
             <submit next="enterdata_confirmation.ashx" namelist="varJobGUID varCallSuccessful varPersonAnswered varPaperworkReceived varIntention" method="post" />	     
             <exit/>
          </catch>
       </form>

    </vxml>
reminder.vxml

Code: Select all

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

       <form id="reminder">
          <block>
             <prompt bargein="false">
                <audio src="#REMINDER#"></audio>
             </prompt>
             <goto next="#location"/>
          </block>
       </form>
       <form id="location">
          <block>
             <prompt bargein="false">
                <audio src="#LOCATION#"></audio>
             </prompt>
             <goto next="#secondassign"/>
          </block>
       </form>
       <form id="secondassign">
          <block>
             <assign name="varPersonAnswered" expr="'no'"/>
             <assign name="varCallSuccessful" expr="'yes'"/>
             <assign name="varPaperworkReceived" expr="'none'"/>
             <assign name="varIntention" expr="'none'"/>
             <goto next="#arriveat"/>
          </block>
       </form>
       <form id="arriveat">
          <block>
             <prompt bargein="false">
                <audio src="#ARRIVEAT#"></audio>
             </prompt>
             <goto next="#fulltime"/>
          </block>
       </form>
       <form id="fulltime">
          <block>
             <prompt bargein="false">
                #FULLTIME#
             </prompt>
             <goto next="#copay"/>
          </block>
       </form>
       <form id="copay">
          <block>
             <prompt bargein="false">
                #COPAY#
             </prompt>
             <goto next="#insurance"/>
          </block>
       </form>
       <form id="insurance">
          <block>
             <prompt bargein="false">
                <audio src="#INSURANCE#"></audio>
             </prompt>
             <goto next="#machineclosing"/>
          </block>
       </form>
       <form id="machineclosing">
          <block>
             <prompt bargein="false">
                <audio src="#MACHINECLOSING#"></audio>
             </prompt>
          </block>
       </form>

    </vxml>
Please let us know if we're misunderstanding your intent.

Regards,
Plum Support

Re: new problem with catching disconnect

Posted: Mon Nov 21, 2011 3:21 pm
by magicsoft
No, that's not what I meant. I have a catch event in a root document. I want to catch a hangup at any point in the script. I was just using the "FULLDATE" spot to illustrate what I had to do to get it to catch the hangup. Without the "dummy field" part, it will ignore the hangup that occurs there. If I do what you suggested, it will appear to work, but only because there is nothing in the script after that point. But to do it that way, I'd have to separate each and every "form" element to a different VXML document, which I certainly don't want to do.

I want to be able to catch a hangup at any point in the script, but I don't want to use a "dummy field" to do it. But so far, I haven't been able to get it to work without doing so. Without the dummy field, it just continues to process the entire form, and it totally ignores the fact that I hung up.

Andrew

Re: new problem with catching disconnect

Posted: Mon Nov 21, 2011 3:45 pm
by support
Hi Andrew,

In that case, you do not need any <catch> tags within your application, except for once in call_root_confirmation.vxml. Could you post your code for call_root_confirmation.vxml so we can see what's going on?

Regards,
Plum Support

Re: new problem with catching disconnect

Posted: Mon Nov 21, 2011 3:47 pm
by magicsoft
Yes, I know that. I was just trying to illustrate my problem by putting everything together into as small a sample as possible. The root document for the form in question is:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<var name="varJobGUID"/>
<var name="varLanguage"/>
<var name="varFileName"/>
<var name="varPersonAnswered"/>
<var name="varCallSuccessful"/>
<var name="varPaperworkReceived"/>
<var name="varIntention"/>
<var name="varPatient"/>
<var name="varProceed"/>

<property name="inputmodes" value="dtmf"/>

<catch event="connection.disconnect.hangup">
	<log label="mylog">I AM IN THE CATCH EVENT</log>
	<submit next="enterdata_confirmation.ashx" namelist="varJobGUID varCallSuccessful varPersonAnswered varPaperworkReceived varIntention" method="post" />
</catch>

</vxml>

Re: new problem with catching disconnect

Posted: Mon Nov 21, 2011 5:30 pm
by support
Hi Andrew,

We could not find anything wrong with your code. So, after placing several test calls while hanging up at different points, we have discovered that the platform does not catch the connection.disconnect.hangup event immediately. It does take a couple seconds after the user has hung up before the platform recognizes the hangup event. Within those couple seconds, the vxml code continues to run. Since your application does not have many prompts or wait for user input, it appeared your app was ignoring the catch event. However, if your app took more than a couple seconds to run, it would have caught the hangup and handled it properly before the end of your application.

We're assuming in the production version of your application, you would play audio and have prompts that would take longer than the couple of seconds it takes to catch the hangup event. However, to guarantee that your variables will not be improperly reassigned, even with very short test prompts, you will have to split your app into different files.

You do not need to separate every <form>, you only need to separate your application before you change your variables' values. So for the example code you gave us, you would need to spread your app through 2 different files.

Regards,
Plum Support