Page 1 of 1

saving wav file not working

Posted: Wed Nov 08, 2006 4:14 pm
by brent.russell
I have done everything I can think of and now I am at an end. If I use an html form and post a wav file to my php script, it saves it on the server and I can play it back.

If I use plum's IVR system to post a recorded message to the same php script, then I cant play the file even though it contains garbeled data. I tried opening it up in flash and it won't import it. I tried opening it with a sound editor and it does not recognize it either.

vxml:
[code]
<subdialog name="oResult" src="http://application.mobilemessenger.com. ... /index.php"
namelist="voice_message phone_number source ivr_user_name ivr_password request_type" method="post">
<filled>
<if cond="oResult.code">
Message saved
<else/>
Error saving greeting
<log><value expr="oResult.msg"/></log>
</if>
</filled>
</subdialog>
[/code]


The basics of what my php code does. Remember, it works with an HTML form:
[code]
<?php
$newfile = "/home/savedmessages/myfile.wav";
$temp_file_name = $_FILES['voice_message']['tmp_name'];
move_uploaded_file($temp_file_name, $newfile);
?>
[/code]


Any idea why it works elsewhere but I can not save it with plums server?

Posted: Thu Nov 09, 2006 3:17 pm
by brent.russell
Figured it out.

In order to post it as a wav file you need to set the type atribute in the record tag. It looks like plums servers save the messages as audio/x-wav