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

Telephone number or # key doesn't works

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

Telephone number or # key doesn't works

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

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

IVR code for nomatch message

Post 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
Last edited by support on Sat Jan 09, 2010 2:12 pm, edited 2 times in total.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

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

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

Use termtimeout anf interdigittimeout with IVR application

Post 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
Last edited by support on Sat Jan 09, 2010 2:12 pm, edited 2 times in total.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

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

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

IVR application uses pound key as terminator by default

Post 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
Last edited by support on Tue Feb 16, 2010 2:08 pm, edited 3 times in total.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

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

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

IVR code for global key handling

Post 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
Last edited by support on Sat Jan 09, 2010 2:16 pm, edited 2 times in total.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

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

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

IVR code for global key handling

Post 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

Post Reply