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

Easiest way to have ** exit back to the top of the call tree

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
dking
Posts: 15
Joined: Thu Jun 10, 2004 1:44 pm

Easiest way to have ** exit back to the top of the call tree

Post by dking »

What would be the easiest way to have ** take the user back to the top of the call tree at any time during the call? Some of my inputs only accept digits and inputting ** would just throw a nomatch event. Same thing would happen for menus.

Is there a better/more standard way to accomplish this besides **? I don't want to use a single * because I'm reserving that for specifying extensions on phone numbers.

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

IVR code for ** exit back to the top of the call tree

Post by support »

The best way to do that is probably to define a global <link>, and define an IVR grammar within that link to go somewhere else. For IVR example:

Code: Select all

<link expr="'#caught_star'">
  <grammar type="application/x-jsgf">^"*"$</grammar>
</link>


<form id="caught_star">
 <field name="next_char">
   <grammar>7</grammar>
   <prompt timeout="10ms">
     <break time="2.4s"/>
   </prompt>
   <filled>
     <if cond="next_char == 7">
       <goto expr="'#do_save'"/>
    </if>
   </filled>
  <catch event="noinput nomatch">
    <goto expr="prevForm" />
  </catch>
 </field>
</form>

In the above IVR code, we <catch> a star first, than execute a <form> that catches a 7. So this link basically handles the case where the user presses *7 from anywhere in the document.

Hope this helps! :)

Plum Support Staff

Post Reply