Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

Vxml , using using post to save the audio file to server using php

  I am working on cisco  voice gateway and all i need to is post an audio file which I save on the local RAM at the gateway to my server (IIS 5.0)

the code for submit is
<submit next="http://IPaddrXXX:portXXX/xml/loadsound.php" namelist ="myrec" method="post" enctype="multipart/form-data"/>
the audio file is being saved as myrec.

My loadsound.php goes as follows:-
 $msg = "";
$code = 1;
if (is_uploaded_file($tmpFile))
  copy($tmpFile, sprintf("%s",$wavfile));
  $msg = "audio saved";
  $code = 0;
  $msg = "unable to save audio";
 $to = "XXXX@yahoo.com";
   $from = "janedoe@anotherfakedomain.com";
    $subject = "This is a test email";
    $message = "Dear John,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Jane.";

    $headers  = "From: $from\r\n";

    $success = mail($to, $subject, $message, $headers);
    if ($success)
        echo "The email to $to from $from was successfully sent";
        echo "An error occurred when sending the email to $to from $from" ;  

But What is happening is that even the php script is not being invoked since I do not recieve an email as it should
But if i use
<goto next="http://IPaddrXXX:portXXX/xml/loadsound.php">
It calls the script and sends me a mail.
So the paths and IP addresses,portno. all are fine.
Some problem with POST. Am I doing something wrong while posting it? At times I even get a http 503 .
1 Solution
I take it that you're sure your email works from other scripts...

What happens if you POST to that php file from a normal html page?  Maybe try creating a dummy html page that uploads a file to this page and "fakes" what your VXML script would be doing?

Just a thought.  I always helps to narrow down the exact source of your problem.
blinker82Author Commented:
ya Doug,
I did that........and it works fine.
But when I call it from my vxml script..........nothing happens.........
Somewhere in an older cisco manual I did read that posting an audio file does not work for PHP using IIS 5.0,
which sounded strange to me.
Any insights there?
check this may help.

Here is some explantain about the 503 error.


hope this help.s

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now