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

Disconnect Event not caught while in Prompt

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
tloring
Posts: 22
Joined: Sun Sep 07, 2003 3:51 pm

Disconnect Event not caught while in Prompt

Post by tloring »

Hello, I've discovered that in my record element processing, if a hangup occurs while the prompt is being played, the connect.disconnect event handler is not invoked.

Once in record mode, after the beep, the disconnect handling is caught properly. That has always worked fine.

It is not unusual for a user to hang up during a prompt, and it is essential that the handler is run to submit the recording - since this may occur when appending to a recording, this is not necessarily an empty bit of recording...there's backend processing that must occur for previously recorded portions.

I would expect that the catch event would apply to the prompt here, or does must there be another catch event w/i the prompt tags perhaps - looking at the VXML spec, catch is not a valid child of prompt.

Any insight would be greatly appreciated! Thanks.

Code: Select all

<form id="record">
  <record name="recording" beep="true" dtmfterm="true" 
          maxtime="600s" finalsilence="60s" type="audio/basic">
    <prompt bargein="false">
      <voice name="audrey">Dictate at the beep.</voice>
    </prompt>
    <catch event="connection.disconnect">
      <var name="disconnect" expr="1"/>
      <submit next="record-save.xml" method="post" 
              namelist="recording position disconnect"/>
    </catch>
  </record>
   ...
</form>

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

replaced submit tag in IVR code with a log tag

Post by support »

Hello,

We took your IVR code below, replaced the <submit> tag with a <log> tag and were unable to replicate your IVR problem. The log tag was always invoked no matter when we hung up. You should be able to check your web server logs to ensure that the submit actually happened.

We suspect it could be a problem on your record-save.xml page. Really, that page (after perform all its server-side scripting, of course) shouldn't be generating vxml much more complicated than a simple block with an <exit> tag.

Code: Select all

 <?xml version="1.0?>
 <vxml version="2.0">
 <form>
   <block><exit/></block>
 </form>
Otherwise (depending on the complexity of the resulting vxml), another disconnect event may be thrown, which would cause the IVR call to be dropped completely.

You may also want to post a "wider view" IVR code snippet from both pages, so that we can look a bit more closely.


Regards,

Plum Support
Last edited by support on Thu Feb 25, 2010 3:33 pm, edited 3 times in total.

tloring
Posts: 22
Joined: Sun Sep 07, 2003 3:51 pm

Post by tloring »

Thanks...I will investigate further.

I am certain that the submit is not being executed, but I will verify.

In the case of a disconnect, record-save.xml does return a simple block w/ exit...however, record-save.xml is not getting executed in the case of it occuring during the prompt.

Again, I will verify, and create a succinct test case if I can reproduce.

Thanks,
Thom

tloring
Posts: 22
Joined: Sun Sep 07, 2003 3:51 pm

Post by tloring »

D'oh. Ok...yes, the disconnect is indeed being caught and handled properly...I was mishandling things on the record save.

Fwiw, I was doing a check on whether I had an upload payload, and if I did I'd queue it for processing, then continue or disconnect depending on the context. Which seemed reasonable in order to avoid queueing an entirely empty recording in the case of an immediate hangup...except in the case of hanging up in the prompt during a review cycle, there was no payload, and the queueing was not happening...'cause that's what I told it to do.

It's so obvious now! Thanks.
Thom

Post Reply