We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Range of numbers grammar

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jdart
Posts: 17
Joined: Wed Jul 30, 2008 1:09 pm

Range of numbers grammar

Post 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?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code to allow a range of numbers in grammar

Post 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

Post Reply