I need to calculate and assign maxtime of the record before user could actually record a message. I am using following code to achieve this but its not working.
The maxtime="mrt" does not work. It is expecting a string of time like "300s". Although you may be tempted to use a <value name="mrt"/> there, that itself would not work. Instead, you would want to echo a variable into the IVR <record> attribute, maxtime, from your IVR application server.
The problem with your initial IVR code is that maxtime cannot be set to a variable within the IVR <record> attribute. It has to be set as a time like "300s" or "180s". Instead, you would have to set up your variable, mrt, first on the IVR server script side and then "write" it into the VoiceXML with your IVR server script language (php, asp, etc.). The following is an IVR example that could be used for ASP.
Thanks for the reply but that didn't solved my problem.
Infact both of your reply meant the same that maxtime can't be set to a variable thats what I complaint for. I needed it that way. Now I have to change my app design to cover this deficiency. But now I am facing another problem.
for one hour recording. Maxtime doesn't seems to be applying and recording is terminated after one min only. When I tried this tag in scratch pad, it continue to record as expected. Now I am wondering if there is any limit of max record time when documented fetched from remote URL or for developer account or is there any other problem?
To reproduce make a load the document from remote URL. With scratch pad it just works fine.
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form>
<record name="userrecording" maxtime="3600s" finalsilence="30s" dtmfterm="true" beep="true" type="audio/x-wav">
<prompt>
Please record a message after the beep.
</prompt>
<filled>
You just recorded the following message:
<value expr="userrecording"/>.
</filled>
</record>
</form>
</vxml>
Have you been able to reliably reproduce this IVR issue on your IVR developer account?
Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 11:33 am, edited 7 times in total.
Thu 03 Dec 2009 10:02:36 AM UTC:
starting playback: bargein=false, inputmodes="dtmf speech"
Newly queued prompts are now being played
bargein set to true
Cache Miss: file:///usr/local/plumvp/resources/beep.ulaw
Attempting to fetch file:///usr/local/plumvp/resources/beep.ulaw
Audio segment from the URL resources/beep.ulaw added to prompt queue
VXI::record_element - activating grammars for form = 'frmRecordVoice' formitem = 'userrecording'
PromptManager::Play()
Thu 03 Dec 2009 10:02:41 AM UTC:
starting playback: bargein=true, inputmodes="dtmf speech"
Newly queued prompts are now being played
Thu 03 Dec 2009 10:04:04 AM UTC:
VXI::assign_element(name="InvalidTry" expr = "0")
VXI::assign_element(name="document.varRecordedVoice" expr = "userrecording")
VXI::assign_element(name="document.AudioDuration" expr = "userrecording$.duration")
Reproducibility:EveryTime, recorded voice is continuous till end so no final silence as well.