Menu

Definition

This is a method to present the user with a list of choices. For each <menu>, there can be one or several branches.

Value

The menu tag requires at least one <play> tag and one <keypress> tag.

Attributes

Attribute Required Values Description
name N any text A unique name for the tag
maxDigits Y numerical value A maximum number of digits to input
timeout Y numerical value A timeout in milliseconds

Examples

This is a simple inbound call-routing IVR.

<dialplan name="Root">
    <menu name="main_menu">
        <play type="tts">Press 1 for sales. Press 3 for support. Press 4, 5, or 6 for support 2.</play>
        <keypress pressed="1">
            <transfer name="transfer_sales" callerid="5555551212">
                5555552222
            </transfer>
        </keypress>
        <keypress pressed="3">
            <transfer name="transfer_support" callerid="5555551212">
                5555553232
            </transfer>
        </keypress>
        <keypress pressed="4-6">
            <transfer name="transfer_support2" callerid="5555551213">
                5555553232
            </transfer>
        </keypress>
        <keypress pressed="Default">
            <play type="tts">Whoa! That wasn't a choice. Bye!</play>
        </keypress>
    </menu>
</dialplan>