Page 1 of 1

Receiving Postback prior to receiving completed input

Posted: Thu May 14, 2009 12:25 pm
by wperry
I had the following Voice XML,

<?xml version="1.0" encoding="utf-8" ?>
<vxml version="2.0">
<property name="inputmodes" value="dtmf" />
<form id="listenToLoad">
<field name="txtPurchaseOrder" type="digits">
<prompt bargein="false">Enter the purchase order number for the load you want to listen to.</prompt>
</field>
<filled mode="all">
<submit next="http://130.100.3.55/ListenToLoad.aspx" method="post" />
</filled>
</form>
</vxml>

When I tried to enter the following digits 2342166, the page was posted back to me with txtPurchaseOrder = 23.

Not knowing what was going on, I changed the voice Xml to,

<?xml version="1.0" encoding="utf-8" ?><vxml version="2.0">
<property name="inputmodes" value="dtmf" />
<form id="listenToLoad">
<field name="txtPurchaseOrder" type="digits?length=7>
<prompt timeout="10000" bargein="true">Enter the purchase order number for the load you want to listen to.</prompt>
</field>
<filled mode="all">
<submit next="http://130.100.3.55/ListenToLoad.aspx" method="post"></submit>
</filled>
</form>
</vxml>

Everything worked fine, but the problem is the purchase order isn't alway 7 digist long. So I changed the voice xml to,

<?xml version="1.0" encoding="utf-8" ?><vxml version="2.0">
<property name="inputmodes" value="dtmf" />
<form id="listenToLoad">
<field name="txtPurchaseOrder" type="digits?minlength=7;maxlength=10">
<prompt timeout="10000" bargein="true">Enter the purchase order number for the load you want to listen to.</prompt>
</field>
<filled mode="all">
<submit next="http://130.100.3.55/ListenToLoad.aspx" method="post"></submit>
</filled>
</form>
</vxml>

The following was the result

Call Logs

Wed 03 Dec 2008 09:32:57 PM EST:

dtmf input: 1
Found grammar match
hypothesis #0: 1 (1.0000)
DocumentParser::FetchDocument(http://130.100.3.55/ListenToLoad.aspx)
Cache Miss: http://130.100.3.55/ListenToLoad.aspx
Attempting to fetch http://130.100.3.55/ListenToLoad.aspx
Click here to view saved VoiceXML script
Loading Builtin grammar: builtin:dtmf/digits?minlength=7;maxlength=10
Loading Builtin grammar: builtin:dtmf/digits?minlength=7;maxlength=10
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Enter the purchase order number for the load you want to listen to.</speak>
---------


Wed 03 Dec 2008 09:32:58 PM EST:

VXI::field_element - activating grammars for form = 'listenToLoad' formitem = 'txtPurchaseOrder'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played


Wed 03 Dec 2008 09:33:03 PM EST:

dtmf input: 23
received event: nomatch:
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Sorry, I didn't understand you. </speak>
---------
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Enter the purchase order number for the load you want to listen to.</speak>
---------


Wed 03 Dec 2008 09:33:04 PM EST:

VXI::field_element - activating grammars for form = 'listenToLoad' formitem = 'txtPurchaseOrder'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played


Wed 03 Dec 2008 09:33:13 PM EST:

dtmf input: 23
received event: nomatch:
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>I still don't understand. </speak>
---------
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Enter the purchase order number for the load you want to listen to.</speak>
---------
VXI::field_element - activating grammars for form = 'listenToLoad' formitem = 'txtPurchaseOrder'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played


Wed 03 Dec 2008 09:33:14 PM EST:

dtmf input: 4


Wed 03 Dec 2008 09:33:15 PM EST:

received event: nomatch:
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Please say it one last time. </speak>
---------
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Enter the purchase order number for the load you want to listen to.</speak>
---------
VXI::field_element - activating grammars for form = 'listenToLoad' formitem = 'txtPurchaseOrder'
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played


Wed 03 Dec 2008 09:33:16 PM EST:

dtmf input: 2
received event: nomatch:
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>I'm sorry. I just can't understand your response.</speak>
---------
VXI::exit_element()
Newly queued prompts are now being played


Wed 03 Dec 2008 09:33:20 PM EST:

Call End Event
Ending session
Ending Session On Channel 20


Please help me solve this because I have a lot more fields in my application that take a variable number of digists.

IVR code fix for problem with inputting of digits

Posted: Thu May 14, 2009 1:44 pm
by support
Hi,

Looking at the IVR call log, it appears as though the user did not enter the correct number of digits as log shows only 1-digit or 2-digit entries.

This could possibly indicate that the user wasn't entering the digits quickly enough. We have taken your IVR code and revised it in the following way and have tested that it works for us. Please note the IVR tag, <property>, and how the IVR tag, <field>, are implemented below.

digitsinput.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<property name="inputmodes" value="dtmf" />
<property name="termtimeout" value="3s"/>
<property name="interdigittimeout" value="3s"/>
<form id="listenToLoad">
<field name="txtPurchaseOrder" type="digits?minlength=7;maxlength=10">
<prompt timeout="10000" bargein="true">Enter the purchase order number for the load you want to listen to.</prompt>
<filled>
<submit next="digitsplayback.php" method="post" namelist="txtPurchaseOrder"></submit>
</filled>
</field>
</form>
</vxml> 
digitsplayback.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
$txtPurchaseOrder = $_POST['txtPurchaseOrder'];
?>
<vxml version="2.0">
<form>
	<block>
		<?php 
                echo "<prompt>
                You entered $txtPurchaseOrder.
                </prompt>"
		?>
	</block>
</form>
</vxml>
Please let us know if you experience any further IVR issues with this.

Regards,
Plum Support

Posted: Thu May 14, 2009 2:44 pm
by wperry
I would agree if I weren't the user and know that I was entering the digits at the same rate I do everywhere else in the application. The good new is adding the <property name="interdigittimeout" value="3s" />
<property name="termtimeout" value="3s" /> elements seems to fix the problem.

Thanks!