Page 1 of 1

Range of numbers grammar

Posted: Mon Aug 11, 2008 5:03 pm
by jdart
I'm trying to create a grammar that checks for a range of numbers going.

I've tried a field like this but it allows everything.
<field name="foo">
<grammar src="builtin:dtmf/digits?minlength=5"/>
<grammar src="builtin:dtmf/digits?maxlength=10"/>
<nomatch>
Nope.
</nomatch>
<filled>
Ok.
</filled>
</field>

This will accept 1 digit. I guess it's only checking the last grammar? Is there a way to do this without ecma script?

IVR code to allow a range of numbers in grammar

Posted: Mon Aug 11, 2008 5:11 pm
by support
Hi,

You could try adjusting your IVR grammar to be a builtin IVR grammar within your <field>:

Code: Select all

<field name="foo" type="digits?minlength=5;maxlength=10">
      <prompt>
        Please enter a number between 5 and 10 digits.
      </prompt>
      <nomatch>
        Nope.
      </nomatch>
      <filled>
        Ok.
      </filled> 
</field>
Hope this helps.

Regards,
Plum Support