legacy:vxi_developer_guide:voicexml_fundamentals:menus

Menus

A menu gives the user a list of choices to select from and transitions to a different dialog or document based on the user's choice.

Following is an example of a menu:

<menu>
 <prompt>Say what sports news you are interested in:
  <enumerate/>
 </prompt>
 <choice dtmf="1" next="http://www.news.com/hockey.vxml">
  Hockey
 </choice>
 <choice dtmf="2" next="http://www.news.com/baseball.vxml">
  Baseball
 </choice>
 <choice dtmf="3"  next="http://www.news.com/football.vxml">
  Football
 </choice>
 <noinput>
  Please say what sports news you are interested in
  <enumerate/>
 </noinput>
</menu>

The menu element supports the following attributes:

idThe id attribute identifies the menu.
scopeThe scope attribute identifies the scope of the menu's grammar.
dtmfIf choices in a menu don't have explicit DTMF elements, they are given implicit ones “1”, “2”, etc. This is only if DTMF is set to 'true'.

The choice element specifies the URL to go based on the choice selected from the menu. The enumerate element specifies a template that is applied to each choice in the order they appear in the menu. So, for the above code example, the menu's prompt would be, “Please say what sports news you are interested in listening: hockey, baseball, or football.”

  • legacy/vxi_developer_guide/voicexml_fundamentals/menus.txt
  • Last modified: 2017/07/28 23:53
  • by javier