Page 1 of 1

catch fails in second script

Posted: Wed Aug 29, 2007 7:56 am
by moshe
I have two scripts. The first does a recording; it then does a submit to the second script. The second script puts the file away (PHP) and plays a brief thank you.

The first script contains a catch at the document level for the event "connection.disconnect". If the caller hangs up, this catch does a submit (without the recording) to the second script.

The second script also has a document-level catch element in case the call arrives in the disconnected state or in case the caller hangs up in mid-announcement.

However, this second document's catch element is never triggered. Instead, the log shows:

Can not queue audio -- line disconnected
received event: connection.disconnect.hangup
Max Disconnect Count Exceeded
Call End Event
Ending session
Ending Session On Channel 7

Is this a special counter for disconnect events? I don't include a "count" attribute in my catch element. What is the work around, if any? I can think of one (check the state on arrival) and I'm implementing it, but where would I find this documented?

catch fails in second script of IVR code

Posted: Wed Aug 29, 2007 11:26 am
by support
Hi,

Could you post the IVR code in your IVR scripts? We need more information to help you fix this IVR problem.

Regards,
Plum Support

Posted: Wed Aug 29, 2007 1:21 pm
by moshe
I believe that the problem is caused by a counter at your end: I'm only allowed to "catch" disconnect once, and the second time through you kick me off.

Fragments:

First script:
<catch event="connection.disconnect">
<submit expr="recordNoteResult" enctype="multipart/form-data" method="post" namelist="status uID TaskId tn"/>
</catch>

<form>
<field>
etc.

Second script:

<catch event="connection.disconnect">
<submit expr="recordNoteResult" enctype="multipart/form-data" method="post" namelist="status uID TaskId tn"/>
</catch>

<form>
<block>
<prompt> get ready to exit </prompt>
<exit/>
</form>

Posted: Wed Aug 29, 2007 1:24 pm
by moshe
So to be quite clear, the "problem" isn't really a problem; it's a safety feature to avoid infinite loops on the platform. I already have scripted around it, but I'm interested in knowing if there's a count="2" or property workaround.

IVR info onhow events work with catch handlers

Posted: Wed Aug 29, 2007 2:55 pm
by support
Hi,

When the caller hangs up and the first catch in your first document is executed, it will never go into the second document's catch element since the disconnect event can only be caught once.

For more IVR information on how events work with catch handlers, you can go here:
http://www.w3.org/TR/voicexml20/#dml5.2

Regards,
Plum Support

Posted: Wed Aug 29, 2007 3:53 pm
by moshe
Sorry, I posted the sample code that includes some of the workarounds.

In the second document, I was originally trying to send a prompt, and I was disconnected at the time.

This genereated a new disconnect event, which -- instead of hitting the catch -- gave me a 'too many disconnect" messages and exited.

IVR error- remove any prompts from file you post to

Posted: Thu Aug 30, 2007 9:24 am
by support
Hi,

The reason you get this message:

Code: Select all

Can not queue audio -- line disconnected
received event: connection.disconnect.hangup
Max Disconnect Count Exceeded
Call End Event
Ending session
Ending Session On Channel 7 
is because the max disconnect count is 2. So, when the caller hangs up, this throws a connection.disconnect event. Once a connection.disconnect event has been thrown, the IVR system will immediately end the IVR call if the IVR script attempts to play audio again, causing another connection.disconnect event. This explains why you are getting this message since your second IVR script tries to play audio to the caller after the caller has already hung up.

To avoid getting this IVR error, remove any prompts from the file that you are posting to.

Regards,
Plum Support