We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Pre recorded numbers

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
brent.russell
Posts: 50
Joined: Wed Oct 04, 2006 1:34 pm
Location: SOCAL
Contact:

Pre recorded numbers

Post by brent.russell »

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

Code: Select all

<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>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code to dynamically generate audio tags

Post by support »

Hi,

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):

Code: Select all

<!-- 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>


Hope this helps,

Regards,

Plum Support

Post Reply