I had a studio create all of my voices for my IVR. Now everything sounds great except when I repeat a number that a user has entered. I have 1.mp3, 2.mp3, 3.mp3, 4.mp3 etc. How do I get those mp3's played in place of the numbers in the below example. The variable document.tempPhoneNumber lets say is 3106237464... but remember that variable is dynamic to what the user enters
<prompt timeout="6s">
<audio src="http://application.mobilemessenger.com.au/customer_care_ivr/UK/voice_overs/VO3.mp3">You have entered </audio>
<say-as type="acronym"><value expr="document.tempPhoneNumber"/></say-as>
<audio src="http://application.mobilemessenger.com.au/customer_care_ivr/UK/voice_overs/VO4.mp3">If this phone number is correct, press one, if not press two.</audio>
</prompt>
This really can't be done in-line using Ecmascript. We've been able to work around this by sending the value to another IVR script as part of a subdialog call, letting the scripting language (e.g. PHP) dynamically generate the <audio> tags, and then returning the caller's response to the calling dialog. For an IVR example (NOT DEBUGGED... caveat emptor):
<!-- from calling scope, "entry" holds the value the caller entered -->
<subdialog name="confirm" src="confirm.php" namelist="entry">
<filled>
<if cond="confirm.response == true">
<!-- do something -->
<else>
<!-- do something else -->
</if>
</filled>
</subdialog>
<!-- within confirm.php -->
<form id="confirm">
<field name="response" type="boolean">
<prompt>
You entered
<?php
// some PHP or other scripting that walks the 'entry' string submitted to this script char by char and creates/outputs a series of audio tags, e.g. <audio src="1.wav" /><audio src="2.wav" /><audio src="3.wav" />
?>
Is this correct?
</prompt>
<filled>
<return namelist="response" />
</filled>
</field>
</form>