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
Sample Vxml Code to Post audio
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
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
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.
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!
<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!
Hi, I've actually gotten it working properly using the following asp.net that I found:
One final thing that I had to do was save the type as "x-wav":
<record name="recording" type="audio/x-wav">
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>
<record name="recording" type="audio/x-wav">