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

builtin digit grammar help using src in grammar tag

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

builtin digit grammar help using src in grammar tag

Post by jdart »

I can't get the below to match 10 digits entered via dtmf. What am I missing?

Code: Select all

<!-- Phone Number -->
<form id="form_5">
    <property name="recordutterancetype" value="audio/x-wav"/>
    <property name="recordutterance" value="true" />
    <property name="interdigittimeout" value="3s" />
    <field name="field_5">
        <grammar src="builtin:grammar/digits?length=10;" mode="dtmf" />

        <prompt cond="xmllang=='en-us'" xml:lang="en-us" bargein="true">
            <audio src="...">
            </audio>
        </prompt>
        <filled>
        </filled>
        <nomatch>
            ....
        </nomatch>
    </field>
</form>

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

IVR code for grammar issue

Post by support »

Hi,

You should adjust your IVR code to look something like this. Note how the IVR <grammar> and IVR <filled> tags are implemented:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<!-- Phone Number -->
<form id="form_5">
    <field name="field_5">
        <grammar src="builtin:dtmf/digits?length=10"/>

        <prompt>
          Please enter 10 digits.
        </prompt>
        <filled>
          <prompt>
            You entered exactly 10 digits.
          </prompt>
        </filled>
    </field>
</form>
</vxml>
Hope this helps.

Regards,
Plum Support
Last edited by support on Wed Jan 13, 2010 9:27 am, edited 1 time in total.

Post Reply