We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

catch fails in second script

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

catch fails in second script

Post 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?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

catch fails in second script of IVR code

Post 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
Last edited by support on Fri Feb 19, 2010 4:59 pm, edited 2 times in total.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post 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>

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post 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.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR info onhow events work with catch handlers

Post 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
Last edited by support on Tue Dec 29, 2009 1:59 pm, edited 1 time in total.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post 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.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR error- remove any prompts from file you post to

Post 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

Post Reply