I am recording a message in my vice application
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<property name="universals" value="all" />
<var name="cSmsg"/>
.........
...........
<record name="recmsg" beep="true" maxtime="60s"
finalsilence="4000ms" dtmfterm="true" type="audio/x-wav">
.....................
...................
<assign name="cSmsg" expr="recmsg"/>
<prompt>
<voice gender="female">
Here's what you recorded
</voice >
</prompt>
<audio expr="cSmsg"/>
<prompt>
.........
........
<submit next="http://www.webapplications.biz/recmsg.php" enctype="multipart/form-data" method="post" namelist="cSmsg" />
</vxml>
and then sending it to recmsg.php,
recmsg.php
---------------
<vxml version="2.1">
<form id="Test">
<block>
<prompt>
<voice gender="female">
<?php
if (IsSet($_POST['cSmsg'])) {
$cSmsg = $_POST['cSmsg'];
}else{
?>
Sorry! Message not received.
<break />
<?php
}
?>
Received message <?php echo $cSmsg; ?>
<break />
<break />
</voice>
</prompt>
</block>
</form>
which plays it back.
I can hear it when in my application but when it is received on the server it is blank. Why?
Any help is greatly appriciated
AQK
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Problem accessing voice message.
IVR developers recommend site for proper file uploading
Hi,
It looks like you're not handling your file upload properly. The handling can be PHP-version-dependent, so IVR developers recommend looking here for more info: handling file uploads in PHP
Regards,
Plum Support
It looks like you're not handling your file upload properly. The handling can be PHP-version-dependent, so IVR developers recommend looking here for more info: handling file uploads in PHP
Regards,
Plum Support
Last edited by support on Wed Dec 30, 2009 5:10 pm, edited 1 time in total.
Hi,
Thanks a lot for your help.
I have changed my code to:
$cSmsg = $_FILES['cSmsg'][tmp_name];
if (is_uploaded_file($cSmsg))
{
echo "Trying to save your message in a wave file.";
copy($cSmsg, "/home/......./voice/msgs/voicemsg.wav");
echo "Your message is saved in voicemsg.wav file.";
}
else
{
echo "Sorry! Your message could not be saved.";
}
and it is working fine now.
Thanks once again for your help.
AQK
Thanks a lot for your help.
I have changed my code to:
$cSmsg = $_FILES['cSmsg'][tmp_name];
if (is_uploaded_file($cSmsg))
{
echo "Trying to save your message in a wave file.";
copy($cSmsg, "/home/......./voice/msgs/voicemsg.wav");
echo "Your message is saved in voicemsg.wav file.";
}
else
{
echo "Sorry! Your message could not be saved.";
}
and it is working fine now.
Thanks once again for your help.
AQK