Receiving Postback prior to receiving completed input
Posted: Thu May 14, 2009 12:25 pm
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.
<?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.