Page 1 of 1

Telephone number or # key doesn't works

Posted: Wed May 06, 2009 5:07 am
by soso
Hi,

I've a problem on my vxml code. How do I authorize the user to enter a number and null string?

For example, the user can be input the telephone number or only #, but actually, the # causes nomatch event.

This my code:

Code: Select all

    <property name="timeout"                      value="20s" />
    <property name="interdigittimeout"            value="20s" />
    <property name="inputmodes"                   value="dtmf" />
    <property name="bargein"                      value="true" />       
    <property name="termtimeout"                  value="0.5s" />

        <field name="msg">
            <grammar root="ROOT" type="application/srgs+xml" mode="dtmf"> 
                <rule id="ROOT" scope="public"> 
                    <one-of> 
                        <item repeat="0-255"> 
                            <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>           
                        <item> # </item> 
                        
                    </one-of> 
                </rule> 
            </grammar> 

...
</field>

IVR code for nomatch message

Posted: Wed May 06, 2009 7:56 am
by support
Hi,

Looking at your IVR code, you're missing quotation marks around the # key.

Code: Select all

<item> "#" </item>
That's why when the user enters #, they get a nomatch message.

Regards,
Plum Support

Posted: Wed May 06, 2009 8:06 am
by soso
Ok, I've another problem. When the user enter a number, the time is too short. How can I let a 20 secondes before timeout? And a delay between dtmf input?

Thanks by advance.

Use termtimeout anf interdigittimeout with IVR application

Posted: Wed May 06, 2009 8:10 am
by support
Hi,

You can use the IVR properties "termtimeout" and "interdigittimeout" to help you achieve this. You can read more about them here:

http://www.plumvoice.com/docs/dev/voice ... gittimeout
http://www.plumvoice.com/docs/dev/voice ... ermtimeout

Regards,
Plum Support

Posted: Wed May 06, 2009 8:21 am
by soso
Ok,

But the problem is where I want to recognize the null string. When I enter a pound key, the process waiting interdigittimeout seconds. How do I make the response immediatly?

Thanks.

IVR application uses pound key as terminator by default

Posted: Wed May 06, 2009 8:47 am
by support
Hi,

Just for clarification, are you just trying to use the pound key as a termination key when the user is finished entering the telephone number?

If that is the case, you should just remove all references to the pound key in your IVR grammars as our IVR platform treats the pound key as a terminator by default.

Regards,
Plum Support

Posted: Wed May 06, 2009 8:50 am
by soso
No,

I would like to use the pound key to execute another choice. The user can enter a telephone number or pound key. If the pound key is pressed, then a specific routin is execute.

IVR code for global key handling

Posted: Wed May 06, 2009 12:49 pm
by support
Hi,

You can set up global key handling to accomplish this as well.

This previous post gives an example of IVR code showing how you can implement this:

http://support.plumvoice.com/viewtopic.php?t=1184

Regards,
Plum Support

Posted: Thu May 07, 2009 7:02 am
by soso
Sorry, but I write this code:

Code: Select all

 <field name="phone">
            <link next="#null_phone">
                <grammar root="ROOT" type="application/srgs+xml" mode="dtmf"> 
                    <rule id="ROOT" scope="public"> 
                        <one-of> 
                            <item repeat="0-255"> 
                                <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>
                            <item> "#" </item>
                        </one-of> 
                    </rule> 
                </grammar> 
            </link>
The # key execute nomatch event!

Why?

I would when I press "#", to execute a specific vxml page.

IVR code for global key handling

Posted: Thu May 07, 2009 9:42 am
by support
Hi,

Would this example of IVR code using the IVR tag, <link>, work for you?

yourapplicationscript.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0" application="yourrootdocument.php">
<property name="timeout" value="20s" />
<property name="interdigittimeout" value="20s" />
<property name="inputmodes" value="dtmf" />
<property name="bargein" value="true" />       
<property name="termtimeout" value="0.5s" /> 

  <form>
    <field name="phone">

    <grammar root="ROOT" type="application/srgs+xml" mode="dtmf">
      <rule id="ROOT" scope="public">
        <one-of>
            <item repeat="0-255">
                <ruleref uri="#digit"/>
            </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> 

      <prompt>
        Please enter a telephone number
      </prompt>

      <filled>
        <prompt>                                          
          You entered <value expr="phone"/>.
        </prompt>
      </filled>
   
    </field>
  </form>

  <catch event="pound">
    <goto next="specificvxmlpage.php"/>
  </catch>
</vxml> 
yourrootdocument.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<link event="pound">
<grammar type="application/x-jsgf" mode="dtmf">
"#"
</grammar>
</link>
</vxml> 
specificvxmlpage.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0" application="yourrootdocument.php">

<form>

<block>
<prompt>
You have entered the pound key. This is a specific page that handles events for when the user enters the pound key.
</prompt>
</block>

</form>
</vxml> 
From this IVR example, if the user enters #, they immediately get transferred to a specific page. If the user enters a phone number, then they hear the phone number that they have entered.

Hope this helps.

Regards,
Plum Support