We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

record, store and email or store in DB

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sps_sank
Posts: 2
Joined: Fri May 08, 2009 5:38 pm

record, store and email or store in DB

Post 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.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code for audio files

Post by support »

Hi,

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

Regards,
Plum Support
Last edited by support on Thu Dec 24, 2009 3:23 pm, edited 1 time in total.

sps_sank
Posts: 2
Joined: Fri May 08, 2009 5:38 pm

Post 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?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code use with <data> tag

Post 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

Post Reply