Page 1 of 1

builtin digit grammar help using src in grammar tag

Posted: Thu Feb 05, 2009 5:05 pm
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>

IVR code for grammar issue

Posted: Thu Feb 05, 2009 5:28 pm
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