Hi,
Is that anyway by which I can configure that throughout the vxmls. If any time user press the pound key,he should to taken to a new vxml.
Regards,
Amit
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Global key handling
-
- Posts: 53
- Joined: Sun Feb 15, 2009 11:42 pm
- Contact:
IVR code for global key handling
Hi,
Yes, you can do this by using the IVR tag, <link>, within your root document. If you are sending the user to the same page every time they enter the pound key, then you can do the following:
yourapplicationscript.php:
yourrootdocument.php:
yourvxmlpage.php
If you are sending the user to a different page every time the user enters the pound key, you can do the following:
yourapplicationscript.php
yourrootdocument.php:
somedifferentpage.php:
Hope this sample of IVR code helps.
Regards,
Plum Support
Yes, you can do this by using the IVR tag, <link>, within your root document. If you are sending the user to the same page every time they enter the pound key, then you can do the following:
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="voicename" value="lauren"/>
<property name="voicegender" value="female"/>
<form>
<field name="englishdigits" type="digits?length=4">
<prompt>
Please enter some digits.
</prompt>
<filled>
<prompt>
You entered <say-as type="acronym"><value expr="englishdigits"/></say-as>.
</prompt>
</filled>
<nomatch count="1">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
<reprompt/>
</nomatch>
<nomatch count="2">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
</nomatch>
<nomatch count="3">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
<goto next="#differentform"/>
</nomatch>
</field>
</form>
<form id="differentform">
<block>
<prompt>
This is a different form.
</prompt>
</block>
</form>
</vxml>
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<link next="yourvxmlpage.php" dtmf="#"/>
</vxml>
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>
Hello. This is a test page. Good bye.
</prompt>
</block>
</form>
</vxml>
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="voicename" value="lauren"/>
<property name="voicegender" value="female"/>
<form>
<field name="englishdigits" type="digits?length=4">
<prompt>
Please enter some digits.
</prompt>
<filled>
<prompt>
You entered <say-as type="acronym"><value expr="englishdigits"/></say-as>.
</prompt>
</filled>
<nomatch count="1">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
<reprompt/>
</nomatch>
<nomatch count="2">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
</nomatch>
<nomatch count="3">
<prompt>
You did not say or enter the correct number of digits.
</prompt>
<goto next="#differentform"/>
</nomatch>
</field>
</form>
<form id="differentform">
<block>
<prompt>
This is a different form.
</prompt>
</block>
</form>
<catch event="pound">
<goto next="somedifferentpage.php"/>
</catch>
</vxml>
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>
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>
Hello. This is a test page. Good bye.
</prompt>
</block>
</form>
</vxml>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com