Grammar with * support deplay issues
Posted: Mon Nov 20, 2017 11:53 am
So our dtmf only IVR application was running fine with the build in grammars like
<grammar src='builtin:dtmf/digits?length=1'/>
Our legacy VXML browser even supported the * key with the built in grammars. In plumb and other VXML browser, the built in digit grammar doesn't support the * key which makes sense since it is only 0-9 digits.
We also had a delay issue between pages when the user selected a value which we solved with the
<property name="termmaxdigits" value="true"/>
So everything is peachy but the star key. I decided to create a custom grammar like the below. Now the star key works but the delay is back. Seems the termmaxdigits tag is not working now. Does that tag only apply to build in grammars? The grammar below is specifying only one digit by the repeat attribute.
<grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
<rule id="ROOT" scope="public">
<one-of>
<item repeat="1-1">
<ruleref uri="#digit"/>
</item>
<item>"*"</item>
</one-of>
</rule>
<rule id="digit" scope="public">
<one-of>
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</one-of>
</rule>
</grammar>
<grammar src='builtin:dtmf/digits?length=1'/>
Our legacy VXML browser even supported the * key with the built in grammars. In plumb and other VXML browser, the built in digit grammar doesn't support the * key which makes sense since it is only 0-9 digits.
We also had a delay issue between pages when the user selected a value which we solved with the
<property name="termmaxdigits" value="true"/>
So everything is peachy but the star key. I decided to create a custom grammar like the below. Now the star key works but the delay is back. Seems the termmaxdigits tag is not working now. Does that tag only apply to build in grammars? The grammar below is specifying only one digit by the repeat attribute.
<grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
<rule id="ROOT" scope="public">
<one-of>
<item repeat="1-1">
<ruleref uri="#digit"/>
</item>
<item>"*"</item>
</one-of>
</rule>
<rule id="digit" scope="public">
<one-of>
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</one-of>
</rule>
</grammar>