Allows user to choose among alternative destinations.
<menu
id="string"
scope="document"|"dialog"
dtmf="dtmf_sequence"
accept="exact"|"approximate"
>
Child Elements
</menu>
Dialog that transitions to <choice> destinations based on user input.
| Attribute | Description | ||||
id |
Lets you specify this menu as the target for a |
||||
scope |
Sets the scope of the menu's grammar. Optional (default is |
||||
dtmf |
Enables DTMF selection for all choices in this menu. Optional (default is
Note that at most 9 choices can be assigned DTMF selectors with this attribute. If the menu contains more than 9 choices, you can explicitly assign selectors to the additional choices using the If you set this attribute to |
||||
accept |
New in VoiceXML 2.0. Specifies whether the default grammars generated for
Note: The default is |
| Parents | Children |
|
|
error.semantic - Thrown if no grammars are active.
| | VoiceXML 2.0 Specification: <menu> |
| | Related tags: <choice>, <enumerate> |
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<menu id="mainMenu" >
<prompt>
This is the main menu. Where do you want to
start to complete your order? <enumerate/>
</prompt>
<choice next="#dateForm"> date </choice>
<choice next="#quantityForm"> quantity </choice>
<choice next="#phoneForm"> phone </choice>
</menu>
<form id="dateForm">
<field name="date" type="date">
<prompt> When do you want to pick up your order?</prompt>
<filled>
<prompt>
Just to confirm, I heard you say you will pick it up on
<say-as type="date"> <value expr="date"/> </say-as>
</prompt>
</filled>
</field>
<block> <goto next="#quantityForm" /> </block>
</form>
<form id="quantityForm">
<field name="quantity" type="number">
<prompt> How many bags of candy do you want?</prompt>
<filled>
<prompt>
Okay, you have ordered <value expr="quantity"/>
bags of candy.
</prompt>
</filled>
</field>
<block> <goto next="#phoneForm" /> </block>
</form>
<form id="phoneForm">
<field name="phone" type="phone">
<prompt> At what number can I reach you when the order is ready?
</prompt>
<filled>
<prompt>
I guess <say-as type="telephone"> <value expr="phone"/> </say-as>
is your home number.
</prompt>
</filled>
</field>
</form>
</vxml>
| Café Home |
Developer Agreement |
Privacy Policy |
Site Map |
Terms & Conditions Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL |