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

Sample Vxml Code to Post audio

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
jtmerch
Posts: 27
Joined: Thu Jul 27, 2006 3:05 pm

Sample Vxml Code to Post audio

Post by jtmerch »

Hello, I know that you all don't support a specific server side language (I'm using asp.net) but what I'm trying to do is programatically assign a certain file name to each .wav file then post that file to my server to have it stored on my server. Where can i find a sample xml that shows me at least how to specify my own file hame and post the file to my server for processing?

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

file name determined on ASP.net side, not on the IVR side

Post by support »

Hello,

Please see this post:

http://support.plumvoice.com/viewtopic.php?t=600

This post provides a PHP example (we do not have any ASP.net examples). The post follows standard web form behaviors so any IVR code for handling file uploads should work. The file name is determined on the ASP.net side, not on the IVR side. The upload simply uses the variable name when performing the POST, no filename is associated.

Regards,
Plum Support
Last edited by support on Sat Feb 20, 2010 3:09 pm, edited 3 times in total.

jtmerch
Posts: 27
Joined: Thu Jul 27, 2006 3:05 pm

Post by jtmerch »

Thank's I'm using that code but for some reason it's not working. Maybe it's my asp.net. I'll see if that's it and will post any questions that arise. Thanks.

jtmerch
Posts: 27
Joined: Thu Jul 27, 2006 3:05 pm

Post by jtmerch »

One other question however: In the following peice of code:

<subdialog name="test" src="http://www.mydomain.com/vxmlscript.aspx"
namelist="pin recording" method="post">


When I post the "pin" and "recording" variables to my specified server URL will the recording be passed as a form variable, or will the data be uploaded to my server in some other form? I just need to be sure that it's the "recording" binary audio data is being passed as a form field and that I can simply request the form in asp.net (as I would do any other submitted form field).

Thanks!

jtmerch
Posts: 27
Joined: Thu Jul 27, 2006 3:05 pm

Post by jtmerch »

Hi, I've actually gotten it working properly using the following asp.net that I found:

Code: Select all

<%
Request.Files.Item("recording").SaveAs("C:/the/path/filename.wav")
%><?xml version='1.0'?>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
        Thanks, Your message has been saved.
      </prompt>
    </block>
  </form>
</vxml> 
One final thing that I had to do was save the type as "x-wav":

<record name="recording" type="audio/x-wav">

Post Reply