Page 1 of 1

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

Posted: Thu Jul 22, 2004 3:58 pm
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.

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

Posted: Fri Jul 23, 2004 10:08 am
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