code:
<?xml version="1.0"?>
<%@ page language="java" contentType="text/xml;charset=UTF-8"%>
<%@ taglib uri="netui-tags-vxml.tld" prefix="vxml" %>
<vxml:vxml version="2.0">
<vxml:form id="rootMenuForm">
<vxml:field name="icecreamField">
<vxml:grammar xmllang="en-US" root="ROOT" version="1.0" tagformat="swi-semantics/1.0" mode="dtmf">
<vxml:rule id="ROOT" scope="public">
<vxml:ruleref uri="#menu"/>
</vxml:rule>
<vxml:rule id="menu">
<vxml:one-of>
<vxml:item> 1 </vxml:item>
<vxml:item> 2 </vxml:item>
<vxml:item> * </vxml:item>
</vxml:one-of>
</vxml:rule>
</vxml:grammar>
<vxml:prompt timeout="5s">
Please select from the following options:
If you want ice cream, press 1,
otherwise press 2,
To hear the menu again, please press the star key
</vxml:prompt>
<vxml:prompt count="2">
Please listen to the menu carefully.
If you want ice cream, press 1,
otherwise press 2,
To hear the menu again, please press the star key
</vxml:prompt>
<vxml:nomatch>
Did you enter correctly?
<vxml:reprompt/>
</vxml:nomatch>
<vxml:nomatch count="3">
I could not find your selection.
Good-bye
<vxml:disconnect/>
</vxml:nomatch>
<vxml:noinput>
I did not hear your selection.
<vxml:reprompt/>
</vxml:noinput>
<vxml:noinput count="3">
Okay, you did not make any selections, Good-bye
<vxml:disconnect/>
</vxml:noinput>
<vxml:filled>
<vxml:if cond="icecreamField == 1">
okay, tell me what you favourite ice cream is.
<vxml:goto expr="favouriteIcecreamForm"/>
<vxml:elseif cond="icecreamField == 2"/>
What kind of dessert do you want?
<vxml:goto expr="otherDessertForm"/>
<vxml:elseif cond="icecreamField == \"*\""/>
<vxml:reprompt/>
<vxml:else/>
<vxml:throw event="nomatch"/>
</vxml:if>
<vxml:clear namelist="icecreamField"/>
</vxml:filled>
</vxml:field>
</vxml:form>
</vxml:vxml>