recording calls and can't play the wav file
Posted: Fri Oct 26, 2007 8:32 am
I'm recording calls using the script below and sending the data to the web server. The is uploaded without issue, but I can't play it. Both window media and quick time do not reconize the file type. I've tried several types of audio including audio/x-wav and basic.
Code: Select all
<?xml version="1.0"?>
<vxml version="2.1"
xmlns="http://www.w3.org/2001/vxml">
<!-- fictitious user id. this should be established
through a sign in module -->
<var name="uid" expr="'12345'"/>
<form id="record_greeting">
<!-- the resulting recording is stored in the variable personal_greeting
the content cannot be copied into another variable. you may only
submit it to the server via the named variable -->
<record name="personal_greeting"
maxtime="60s" dtmfterm="true" beep="true" type = "audio/basic">
<prompt>
At the tone, please record your personal greeting.
When you're done, press pound.
</prompt>
<!-- if the user doesn't say anything
within finalsilence, catch the noinput -->
<noinput>
Sorry. I didn't hear you. Now returning to the main menu.
<exit />
</noinput>
<filled>
<!-- demo record shadow variables -->
<log>recording size =
<value expr="personal_greeting$.size"/> bytes.</log>
<log>recording duration =
<value expr="personal_greeting$.duration"/> milliseconds.</log>
<log>dtmf key = <value expr="(personal_greeting$.termchar
? personal_greeting$.termchar : 'none')"/></log>
<log>maxtime =
<value expr="personal_greeting$.maxtime"/>.</log>
</filled>
</record>
<!-- confirm that we should commit the new recording -->
<!-- submit the data to the fictitious voice mail server -->
<subdialog name="oResult" src="up.asp"
namelist="personal_greeting" method="post" enctype="multipart/form-data"/>
<filled>
<if cond="oResult.code">
Greeting saved
<else/>
Error saving greeting
<log><value expr="oResult.msg"/></log>
</if>
</filled>
</subdialog>
<!-- FOR TESTING: play the greeting on the server -->
<block>
<audio expr="uid + '.wav'">your greeting</audio>
</block>
</form>
</vxml>