Page 1 of 1

record, store and email or store in DB

Posted: Fri May 08, 2009 5:45 pm
by sps_sank
I used the sample recording of the audio. It worked. But I want to do this.

1. Record the audio in the file. sample code is okay. Then
2. FTP and store the file in http://myserver/record_files/

3. Send an email with the URL link after FTP

[optional 4) use a URL to store in a DB.

Please give me a sample code. I will change the appropriate URL and file settings.

I hope you all have done this.

IVR code for audio files

Posted: Mon May 11, 2009 10:20 am
by support
Hi,

Sorry, but we do not have any sample IVR code of this.

Regards,
Plum Support

Posted: Mon May 11, 2009 1:12 pm
by sps_sank
support wrote:Hi,

Sorry, but we do not have any sample code of this.

Regards,
Plum Support
I managed to do this by myself. I can send email and store the information in the db. So, I can send data from vxml to php.

But it would be great If I can authenticate the phonenumber and send back true or false to the vxml code. any piece of code for this?

IVR code use with <data> tag

Posted: Mon May 11, 2009 3:38 pm
by support
Hi,

You could use the IVR tag, <data>, in sending back a true or false back to the vxml code. For IVR example:

example.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.1">
  <form>
    <data name="domstuff" src="blah.php"/>
    <block>
      That phone number was <value expr="domstuff.documentElement.firstChild.toString()"/>.
    </block>
  </form>
</vxml>
blah.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");

//code for authenticating phone number goes here;
//$boolean variable returns "true" or "false" based on authentication

$boolean = "true";
?>

<boolean><?php echo($boolean);?></boolean>
Hope this sample IVR code helps.

Regards,
Plum Support