Hi, there doesn't seems to have sufficient documentation on how to write SRGS grammars. I have the following simple grammar but couldn't get it to work:
<grammar type="application/srgs+xml" root="userpin">
<rule id="sub_digits_0_thru_9">
<one-of>
<item tag="userpin=0">0</item>
<item tag="userpin=1">1</item>
<item tag="userpin=2">2</item>
<item tag="userpin=3">3</item>
<item tag="userpin=4">4</item>
<item tag="userpin=5">5</item>
<item tag="userpin=6">6</item>
<item tag="userpin=7">7</item>
<item tag="userpin=8">8</item>
<item tag="userpin=9">9</item>
</one-of>
</rule>
<rule id="sub_pin">
<item repeat="5-10">
<ruleref uri="#sub_digits_0_thru_9"/>
</item>
</rule>
<rule id="userpin" scope="public">
<one-of>
<item><ruleref uri="#sub_pin"/></item>
<item tag="userpin=star">*</item>
</one-of>
</rule>
</grammar>
It returned error: "line 48, column 31 - Attribute 'tag' is not declared for element 'item'"
What's the problem with my grammar?
Thanks.
-- SimonT
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Inline grammar not working.
Inline grammar not working.
-- SimonT
IVR code using <tag> tag
Hello,
The problem is that we do not support the attribute "tag" for the <item> tag. You should instead make use of the <tag> tag and change your IVR code to the following:
Hope This Helps!
Plum Support
The problem is that we do not support the attribute "tag" for the <item> tag. You should instead make use of the <tag> tag and change your IVR code to the following:
Code: Select all
<grammar type="application/srgs+xml" root="userpin">
<rule id="sub_digits_0_thru_9">
<one-of>
<item>0<tag>userpin=0</tag></item>
<item>1<tag>userpin=1</tag></item>
<item>2<tag>userpin=2</tag></item>
<item>3<tag>userpin=3</tag></item>
<item>4<tag>userpin=4</tag></item>
<item>5<tag>userpin=5</tag></item>
<item>6<tag>userpin=6</tag></item>
<item>7<tag>userpin=7</tag></item>
<item>8<tag>userpin=8</tag></item>
<item>9<tag>userpin=9</tag></item>
</one-of>
</rule>
<rule id="sub_pin">
<item repeat="5-10">
<ruleref uri="#sub_digits_0_thru_9"/>
</item>
</rule>
<rule id="userpin" scope="public">
<one-of>
<item><ruleref uri="#sub_pin"/></item>
<item tag="userpin=star">*</item>
</one-of>
</rule>
</grammar>
Plum Support