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

Detect Hangup and stop processing

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
markg
Posts: 1
Joined: Tue Nov 05, 2013 11:08 am

Detect Hangup and stop processing

Post by markg »

I wonder if someone can assist me I have a global catch disconnect block

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

<var name="panicTelephoneNumber" expr=""/>
<var name="dtmf_pin" expr="" />

<catch event="connection.disconnect.hangup">
<log label="LALog">Hangup Event</log>
<submit next="#doHangup" />
</catch>

Below this we have several menu sections based on the status from a host system that is working fine.

If I call up the IVR and it reads out my status, then if I hang up my first menu selection is selected by default
I thought that the catch block would trap the disconnect and exit for me. Am I missing something.

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

Re: Detect Hangup and stop processing

Post by support »

Hi,

If you're simply looking to exit when a hangup event occurrs, you can use the <exit> tag to do so.

Plum dev, upon reaching an <exit> tag, will simply discard the variables returned to it and disconnect. Unlike the <disconnect> tag, no event is thrown when an <exit> tag is encountered and the call is immediately terminated.

Here's a simple example of how to use the tag:

Code: Select all


<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
        You will hear this text.
      </prompt>
      <exit/>
      <prompt>
        You will never hear this text.
      </prompt>
    </block>
  </form>
</vxml>

If you're looking to send some data to a script to be processed after the hangup event is caught, you could send that data to an external script to process the data after the call has finished, as opposed to submitting to a form, as it looks like your script is doing.

Let us know if you have any questions. Hope that helps!
Plum Support

Post Reply