Page 1 of 1
No prompts after clear resets field
Posted: Mon Nov 19, 2007 2:17 pm
by moshe
I'm looping through some data, playing prompts and listening for voice/DTMF for each set of data in an small array.
In order to perform the loop, I use a "clear" at the end of a field item. This pushes me back into a prior block within the form, which in turn sends me back to the same field. This happens until all my looping is complete, at which time the block sends me to a different form.
1. I can clearly see, from the log file and log statements, that I do re-enter the block and update data appropriately.
2. I can see that I enter and re-enter the field item -- the correct grammars load.
3. I do *not* get any prompts on the second or subsequent entries into the field item. The prompts simply never queue at all, and therefore are never played.
IVR code and call log needed to help debug issue
Posted: Mon Nov 19, 2007 2:59 pm
by support
Hi,
Could you post a small sample of your IVR code that demonstrates this IVR issue along with an IVR call log? This would help us further debug your IVR issue.
Regards,
Plum Support
Posted: Mon Nov 19, 2007 3:22 pm
by moshe
Code: Select all
<block name="chooseField">
<log expr="logdelim + 'readback task ' + (i+1) + ' of ' + taskArray.length"/>
<!-- more items to read back -->
<if cond="i < taskArray.length">
<if cond="recentUpdates[i].changeType == voice">
<log expr="logdelim + 'readback with voice choice'"/>
<goto nextitem="readbackWithChoice"/>
<elseif cond="recentUpdates[i].changeType == text"/>
<log expr="logdelim + 'standard readback for change type ' + recentUpdates[i].changeType"/>
<goto nextitem="readbackStandard"/>
REMOVED...
</block>
<field name="readbackStandard" cond="ASRandDTMF">
<!-- in this form, when the prompt is over, we do the next thing immediately -->
<property name="timeout" value="500ms"/>
<!-- set grammar for previous menu. -->
<grammar srcexpr="grammarDir + '<?php echo $previousMenu?>'" mode="voice" type="application/srgs+xml"/>
<grammar srcexpr="grammarDir + '<?php echo $previousMenuDTMF?>'" mode="dtmf" type="application/srgs+xml"/>
<prompt>
This is the standard readback debug prompt.
</prompt>
<prompt cond="recentUpdates[i].changeType == changed">
stuff
</prompt>
<prompt cond="recentUpdates[i].changeType == text" >
<value expr="recentUpdates[i].text"/>
</voice>
</prompt>
REMOVED
<!-- noinput means that the announcement completed and it's time to perform next step -->
<noinput>
<assign name="i" expr="i+1"/> <!-- increment position in list of updates -->
<!-- by clearing the block and ourselves, transition automatically to next round -->
<clear namelist="chooseField readbackStandard"/>
</noinput>
</field>
And the log reads
Code: Select all
::::::: LOG ::::::: readback task 1 of 3
::::::: LOG ::::::: standard readback for change type text
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-US">
This is the standard readback debug prompt.
</speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak xml:lang="en-US"><prosody rate="-10%"><break size="medium"/><voice name="lauren" xml:lang="en_us"><speak xml:lang="en_us">
REMOVED FOR PRIVACY
We made it green with red dots</speak></voice></prosody></speak>
---------
Mon 19 Nov 2007 02:56:26 PM EST:
VXI::field_element - activating grammars for form = 'doCheckRecentUpdates' formitem = 'readbackStandard'
Cache Miss: http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.grxml
Attempting to fetch http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.grxml
Finished loading remote grammar from grammars/previousMenu.grxml
Cache Miss: http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.dtmf.grxml
Attempting to fetch http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.dtmf.grxml
Finished loading remote grammar from grammars/previousMenu.dtmf.grxml
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played
Mon 19 Nov 2007 02:56:44 PM EST:
received event: noinput
VXI::assign_element(name="i" expr = "i+1"
::::::: LOG ::::::: readback task 2 of 3
::::::: LOG ::::::: standard readback for change type changed
VXI::field_element - activating grammars for form = 'doCheckRecentUpdates' formitem = 'readbackStandard'
Cache Miss: http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.grxml
Attempting to fetch http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.grxml
Finished loading remote grammar from grammars/previousMenu.grxml
Cache Miss: http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.dtmf.grxml
Attempting to fetch http://some-ip-address/~moshe/devel/freewill/trunk/vxml/grammars/previousMenu.dtmf.grxml
Finished loading remote grammar from grammars/previousMenu.dtmf.grxml
VXI::do_recognition()
PromptManager::Play()
As you can see, the second time around, the grammars load but the prompts do not. The data are actually there; this doesn't seem to be any sort of bad-prompt error ASAICT.
IVR code for using reprompt element
Posted: Mon Nov 19, 2007 5:26 pm
by support
Hi,
In this block of IVR code:
Code: Select all
<noinput>
<assign name="i" expr="i+1"/> <!-- increment position in list of updates -->
<!-- by clearing the block and ourselves, transition automatically to next round -->
<clear namelist="chooseField readbackStandard"/>
</noinput>
I would recommend placing a
<reprompt/> after the
<clear> tag. So your block of IVR code would read:
Code: Select all
<noinput>
<assign name="i" expr="i+1"/> <!-- increment position in list of updates -->
<!-- by clearing the block and ourselves, transition automatically to next round -->
<clear namelist="chooseField readbackStandard"/>
<reprompt/>
</noinput>
Hope this helps.
Regards,
Plum Support
Posted: Mon Nov 19, 2007 5:41 pm
by moshe
Thanks for the tip on using the reprompt element. I'll try it in a few moments.
One question in the meantime: since control of the call flow exits the field element entirely, goes to a block, and then enters again from the "top" of the field element, I'm a little confused as to why the reprompt is necessary. Is this a CCXML standard usage, or a workaround?
<reprompt> tag standard behavior for IVR platform
Posted: Mon Nov 19, 2007 6:08 pm
by support
Hi,
This is the expected behavior of the IVR platform. Anytime you want another prompt to be played after a
nomatch or
noinput, you need to use the IVR
<reprompt> tag.
Regards,
Plum Support
Posted: Mon Nov 19, 2007 10:01 pm
by moshe
Thank you. Using the reprompt element worked.