LogoLogo
  • Go to Docs Center
  • Plum DEV Documentation
  • Overview
  • Developer Reference
    • Tutorial
    • How to...
      • Use Plum's Transcription API
    • Audio Formats and Prompts
    • Grammars and Speech Recognition
    • Available ASR Engines
    • TTS Engine Characteristics
      • Amazon Polly TTS Engine
        • Polly Voice Tag Attribute Details
      • AT&T Natural Voices
      • Cepstral Engine
      • RealSpeak Engine
      • Vocalizer 7
        • Vocalizer 7: <voice> tag and SSML Support
    • Data Exchange
    • Logging
    • Caching
    • Root Documents
  • VoiceXML
    • Tags
      • <assign>
      • <audio>
      • <block>
      • <break>
      • <catch>
      • <choice>
      • <clear>
      • <data>
      • <desc>
      • <disconnect>
      • <else>
      • <elseif>
      • <emphasis>
      • <enumerate>
      • <error>
      • <example>
      • <exit>
      • <field>
      • <filled>
      • <foreach>
      • <form>
      • <goto>
      • <grammar>
      • <help>
      • <if>
      • <initial>
      • <item>
      • <lexicon>
      • <link>
      • <log>
      • <mark>
      • <menu>
      • <meta>
      • <metadata>
      • <noinput>
      • <nomatch>
      • <one-of>
      • <option>
      • <paragraph>
      • <param>
      • <phoneme>
      • <prompt>
      • <property>
      • <prosody>
      • <record>
      • <reprompt>
      • <return>
      • <rule>
      • <ruleref>
      • <say-as>
      • <script>
      • <sentence>
      • <speak>
      • <sub>
      • <subdialog>
      • <submit>
      • <tag>
      • <throw>
      • <token>
      • <transfer>
      • <value>
      • <var>
      • <voice>
      • <vxml>
    • Properties
      • audiofetchhint
      • audiomaxage
      • audiomaxstale
      • bargein
      • bargeintype
      • certverifypeer
      • completetimeout
      • confidencelevel
      • datafetchhint
      • datamaxage
      • datamaxstale
      • documentfetchhint
      • documentmaxage
      • documentmaxstale
      • fetchaudio
      • fetchaudiodelay
      • fetchaudiominimum
      • fetchtimeout
      • grammarfetchhint
      • grammarmaxage
      • grammarmaxstale
      • incompletetimeout
      • inputmodes
      • interdigittimeout
      • logging
      • maxnbest
      • maxspeechtimeout
      • normalizeaudio
      • recordcall
      • recordcallappend
      • recordutterance
      • recordutterancetype
      • scriptfetchhint
      • scriptmaxage
      • scriptmaxstale
      • sensitivity
      • speedvsaccuracy
      • termchar
      • termmaxdigits
      • termtimeout
      • timeout
      • universals
      • voicegender
      • voicename
    • Application and Session Variables
      • application.lastresult$[i].confidence
      • application.lastresult$[i].inputmode
      • application.lastresult$[i].interpretation
      • application.lastresult$[i].recording
      • application.lastresult$[i].recordingduration
      • application.lastresult$[i].recordingsize
      • application.lastresult$[i].utterance
      • session.callrecording
      • session.id
      • session.telephone.ani
      • session.telephone.dnis
    • VoiceXML Resources
  • Plum DEV Guide
    • Using the Plum DEV site
    • Using the File Repository
    • Outbound Calling Guide
      • Using the Outbound Tools in the DEV web UI
      • DEV Outbound Programming Notes
      • Outbound FAQs and Tips
    • Call Reporting
    • Analytics
    • VoiceTrends
    • Debugging
    • Scratchpads
    • Saved URLs
    • Voice Biometrics
    • Call Routing
    • Data Security
      • 'Private' Tags
      • Managing Secure Phone Numbers
      • Sensitive Data Types
    • SMS Guide
      • Standard Short Codes
      • SMS Debugging/Error Logs
      • Additional SMS Info
    • Single Sign On
  • Plum DEV APIs
    • DEV Outbound APIs
      • Contacts CSV Formatting
      • Outbound API Parameter Notes
      • Legacy and Miscellaneous Notes
    • SMS API
    • Call Logs API
    • Call Scheduling and Pacing API
    • Transcription API
    • Application API
    • Blocklist API
Powered by GitBook
On this page
  • <menu>
  • Attributes
  • Notes
  • Example
  • Child Tags
  • Parent Tags
  1. VoiceXML
  2. Tags

<menu>

<menu>

A menu is a convenient syntactic shorthand for a form containing a single anonymous field that prompts the user to make a choice and transitions to different places based on that choice.

Attributes

Name
Data type
Description

id

String

The identifier of the menu. It allows the menu to be the target of a <goto> or a <submit>. This attribute does not allow for any white space.

scope

String

(default is “dialog”) The menu's grammar scope. Accepted values include "dialog" and "document".

If set to "dialog", the menu's grammars are only active when the user transitions into the menu.

If set to "document", grammars are active over the whole document (or if the menu is in the application root document, any loaded document in the application).

accept

String

(default is “exact”) Accepted values include "exact" and "approximate".

When set to “exact”, the text of the choice elements in the menu defines the exact phrase to be recognized.

When set to “approximate”, the text of the choice elements defines an approximate recognition phrase.

Each <choice> can override this setting.

dtmf

Boolean

When set to true, the first nine choices that have not explicitly specified a value for the dtmf attribute are given the implicit ones “1”, “2”, etc.

Remaining choices that have not explicitly specified a value for the dtmf attribute will not be assigned DTMF values (and thus cannot be matched via a DTMF keypress).

Notes

The id attribute for this tag does not allow for any white space.

Example

<?php
header("Content-type: text/xml");
echo "<?xml version=\"1.0\"?>\n";
?>
<vxml version="2.0">
  <menu id="departments">
    <prompt>
      News Departments:
      Press 1 or say sports to be transfered to Sports.
      Press 2 or say weather to be transfered to Weather.
      Press 3 or say operator assistance to be transferred to Operator Assistance.
    </prompt>
    <choice dtmf="1" next="#sports">Sports</choice>
    <choice dtmf="2" next="#weather">Weather</choice>
    <choice dtmf="3" accept="approximate" next="#operator">Operator Assistance</choice>
    <noinput>Sorry, I didn't hear you.</noinput>
    <nomatch>Sorry, I didn't understand you.</nomatch>
  </menu>
  <form id="sports">
    <block>
      <prompt>
        The Rainbow Cubs hit a home run to win the game.
      </prompt>
    </block>
  </form>
  <form id="weather">
    <block>
      <prompt>
        It's raining cats and dogs.
      </prompt>
    </block>
  </form>
  <form id="operator">
    <block>
      <prompt>
        Sorry, there is no operator assistance available.
      </prompt>
    </block>
  </form>
</vxml>

The output of the above script would be:

Computer: News Departments: Press 1 or say sports to be transfered to Sports. Press 2 or say weather to be transfered to Weather. Press 3 or say operator assistance to be transfered to Operator Assistance. Human: Sports. Computer: The Rainbow Cubs hit a home run to win the game.

Child Tags

Parent Tags

Previous<mark>Next<meta>

Last updated 1 year ago

, , , , , , , , , ,

<audio>
<catch>
<choice>
<enumerate>
<error>
<help>
<noinput>
<nomatch>
<prompt>
<property>
<value>
<vxml>