ZVON > References > VoiceXML Reference
Element:choice
Attributes: | caching | dtmf | event | expr | fetchaudio | fetchhint | fetchtimeout | next |
Parents: | menu |
Children: | audio | break | div | emp | enumerate | grammar | pros | sayas | value |
Description:

Go to Standard

Examples:


<choice next="http://www.stargazer.example/voice/astronews.vxml">
     <prompt>
          <audio src="http://www.stargazer.example/space.wav"> Stargazer
               <emp>astrophysics</emp> news
          </audio>
     </prompt>
</choice>


<menu>
     <property name="inputmodes" value="dtmf"/>
     <prompt> For sports press 1, For weather press 2, For Stargazer astrophysics press 3. </prompt>
     <choice dtmf="1" next="http://www.sports.example/vxml/start.vxml"/>
     <choice dtmf="2" next="http://www.weather.example/intro.vxml"/>
     <choice dtmf="3" next="http://www.stargazer.example/voice/astronews.vxml"/>
</menu>


<menu dtmf="true">
     <property name="inputmodes" value="dtmf"/>
     <prompt> For sports press 1, For weather press 2, For Stargazer astrophysics press 3. </prompt>
     <choice next="http://www.sports.example/vxml/start.vxml"/>
     <choice next="http://www.weather.example/intro.vxml"/>
     <choice next="http://www.stargazer.example/voice/astronews.vxml"/>
</menu>


<menu>
     <prompt>Welcome home. Say one of:
          <enumerate/>
     </prompt>
     <choice next="http://www.sports.example/vxml/start.vxml"> Sports </choice>
     <choice next="http://www.weather.example/intro.vxml"> Weather </choice>
     <choice next="http://www.stargazer.example/voice/astronews.vxml"> Stargazer astrophysics news </choice>
     <noinput>Please say one of
          <enumerate/>
     </noinput>
</menu>


<menu dtmf="true">
     <prompt> Welcome home.
          <enumerate> For
               <value expr="_prompt"/>, press
               <value expr="_dtmf"/>.
          </enumerate>
     </prompt>
     <choice next="http://www.sports.example/vxml/start.vxml"> sports </choice>
     <choice next="http://www.weather.example/intro.vxml"> weather </choice>
     <choice next="http://www.stargazer.example/voice/astronews.vxml"> Stargazer astrophysics news </choice>
</menu>