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

how to skip menus without wait for prompts

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
nrk1981
Posts: 4
Joined: Mon Oct 05, 2009 3:29 am

how to skip menus without wait for prompts

Post by nrk1981 »

Hi all,

I have a requirement in my application.
we are supporting about 5 menus with 3 to 4 options each.
if the user types the input 1 2 3 4 directly at the start of the call (at first menu) our intention is to take him to 5th menu directly without waiting for all the option prompts in each of the four menus

could anyone of you know us the solution for this.

thanks
Rajkumar

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

IVR code suggestion for skipping menus

Post by support »

Hi,

Here is an IVR example of one way you could code this to skip <menu> s.

Code: Select all

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

  <form id="main_menu">
    <field name="menu_input">
      <grammar type="application/x-jsgf" mode="dtmf">
        ( 1 | 2 | 3 | 4 | 1234 )
      </grammar>

      <prompt>
	State menu 1 choice.
	State menu 2 choice.
	State menu 3 choice.
	State menu 4 choice.
      </prompt>
      
      <filled>
	<if cond="menu_input == 1">
	  <goto next="#menu1"/>
	  <elseif cond="menu_input == 2"/>
	    <goto next="#menu2"/>
	  <elseif cond="menu_input == 3"/>
	    <goto next="#menu3"/>
	  <elseif cond="menu_input == 4"/>
	    <goto next="#menu4"/>
	  <elseif cond="menu_input == '1 2 3 4'"/>
	    <goto next="#menu5"/>
	</if>
      </filled>
    </field>
  </form>

  <menu id="menu1">
    <prompt>You chose menu 1. </prompt>
    <choice dtmf="1" next="#main_menu"/>
  </menu>

  <menu id="menu2">
    <prompt>You chose menu 2. </prompt>
    <choice dtmf="1" next="#main_menu"/>
  </menu>

  <menu id="menu3">
    <prompt>You chose menu 3. </prompt>
    <choice dtmf="1" next="#main_menu"/>
  </menu>

  <menu id="menu4">
    <prompt>You chose menu 4. </prompt>
    <choice dtmf="1" next="#main_menu"/>
  </menu>

  <menu id="menu5">
    <prompt>You chose menu 5. </prompt>
    <choice dtmf="1" next="#main_menu"/>
  </menu>

</vxml>
This IVR code uses a form for the first menu to give you more flexibility in what you could accept as input for dtmf. Whatever you input then sends you down to the next menu which for this IVR example re-links to the main menu with a dtmf input of 1.

Regards,
Plum Support

Post Reply