Page 1 of 1
Sample Vxml Code to Post audio
Posted: Thu Apr 12, 2007 10:03 am
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?
file name determined on ASP.net side, not on the IVR side
Posted: Thu Apr 12, 2007 12:26 pm
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
Posted: Thu Apr 12, 2007 3:37 pm
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.
Posted: Thu Apr 12, 2007 4:56 pm
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!
Posted: Sun Apr 15, 2007 8:33 am
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">