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 Errors in a root document?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

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

Re: Catch Errors in a root document?

Post by support »

Hi,

From your IVR code, the way you've set it up will not allow you to test these error catch events.

Before the call even begins, our IVR platform checks to see if your code is valid VoiceXML (the VoiceXML Validator can be used to check the validity of your code). If the code is invalid, it will immediately return an error message to anyone who dials into your IVR application.

As for testing your setup, here's an IVR example that you can use as a guideline:

Code: Select all

errortest.php:

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
         Welcome to The Big Show.
      </prompt>
    </block>

  <field name="confirm">
    <grammar>
      Yes|No
    </grammar>
    <prompt>
      To attend, say yes. To not attend, say no.
    </prompt>
    <filled>
      <if cond="confirm=='Yes'">
        <submit next="http://mightyserver.com/Save.php" namelist="confirm"
        method="post" enctype="multipart/form-data"/>
      </if>
      <clear/>
    </filled>
  </field>

   <catch event="error">
      <prompt>There was an error here.</prompt>
   </catch>

  </form>
</vxml>
Hope this helps.

Regards,
Plum Support

Post Reply