Need help in GRXML grammar
Posted: Tue Mar 29, 2016 8:11 am
I am using the below GRXML grammar in IVR application. It always throws nomatch. Please help me to resolve it. If you could provide sample ASR and dtmf GRXML grammar for digits grammar (Ex: phonenumber or zipcode) for reference will be very helpful.
accesscode.grxml
Vxml snippet:
accesscode.grxml
Code: Select all
<?xml version= "1.0"?>
<grammar mode="dtmf"
root="ROOT"
type="application/srgs+xml" >
<rule id="ROOT" scope="public">
<item repeat="1-3">
<ruleref uri="#digits"/>
</item>
</rule>
<rule id="digits" scope="public>
<one-of>
<item>0 <tag>SWI_literal="0"</tag></item>
<item>1 <tag>SWI_literal="1"</tag></item>
<item>2 <tag>SWI_literal="2"</tag></item>
<item>3 <tag>SWI_literal="3"</tag></item>
<item>4 <tag>SWI_literal="4"</tag></item>
<item>5 <tag>SWI_literal="5"</tag></item>
<item>6 <tag>SWI_literal="6"</tag></item>
<item>7 <tag>SWI_literal="7"</tag></item>
<item>8 <tag>SWI_literal="8"</tag></item>
<item>9 <tag>SWI_literal="9"</tag></item>
</one-of>
</rule>
</grammar>
Code: Select all
<form id="frm_accesscode">
<field name="access_code">
<prompt>Enter 3 digit access code</prompt>
<grammar type="application/srgs+xml" mode="dtmf" src="http://.../accesscode.grxml" />
<filled>
Entered access code is <value expr="access_code" />
<goto next="#frm_accesscode" />
</filled>
<nomatch>
....
</nomatch>
<noinput>
...
</noinput>
</field>
</form>