| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<dtmf> element and define your DTMF grammars within the <grammar> element in order to be prepared for the VoiceXML 2.1 standard, as the dtmf element is deprecated in the VoiceXML 2.1 environments:
<grammar type="text/gsl">
<![CDATA[
[
[(dtmf-1)] {<F_1 "one">}
[(dtmf-2) ] {<F_1 "two">}
[(dtmf-3) ] {<F_1 "three">}
]
]]>
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<meta name="maintainer" content="your_email_address@wherever.com"/>
<form id="guessNumber">
<field name="F_1" slot="MySlot">
<prompt>
Please punch in a number on your keypad.
</prompt>
<grammar type="text/gsl">
<![CDATA[[
[(dtmf-1)] {<mySlot "one">}
[(dtmf-2) ] {<mySlot "two">}
[(dtmf-3) ] {<mySlot "three">}
[(dtmf-4) ] {<mySlot "four">}
[(dtmf-5) ] {<mySlot "five">}
[(dtmf-6) ] {<mySlot "six">}
[(dtmf-7) ] {<mySlot "seven">}
[(dtmf-8) ] {<mySlot "eight">}
[(dtmf-9) ] {<mySlot "nine">}
[(dtmf-0) ] {<mySlot "zero">}
]
]]>
</grammar>
<noinput>
<log expr="'****no input'"/>
<prompt>
I did not hear you. Please try again.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<log expr="'****no match'"/>
<prompt>
Is that a number? Please try again.
</prompt>
<reprompt/>
</nomatch>
<filled>
<prompt>
You chose <value expr="F_1$.interpretation.mySlot"/>
</prompt>
<exit/>
</filled>
</field>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
| login |
|