[Freeswitch-users] File upload - mod_curl

RaviRaj Mulasa rml at tollfreeforwarding.com
Fri Apr 27 23:18:07 MSD 2012

In my use I am using outbound socket for FAX
After receiving a 'CUTOM - spandsp::rxfaxresult ' event , I need to call curl/http application  to upload the received fax from remote FreeSWITCH to storage.
I want to run the file upload process in background - bgapi curl post -F file=@/tmp/log/callcontrol.log<mailto:file=@/tmp/log/callcontrol.log>.


From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Yuriy Nasida
Sent: Friday, April 27, 2012 11:57 AM
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] File upload - mod_curl

For example , you can to launch some lua script from FS dialplan and invoke linux command from lua via  io.popen()
From: rml at tollfreeforwarding.com<mailto:rml at tollfreeforwarding.com>
To: freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>
Date: Fri, 27 Apr 2012 00:01:30 +0000
Subject: [Freeswitch-users] File upload - mod_curl

Please let me know how can I upload a file from fs_cli using curl or other http application of FreeSWITCH.

>From Linux command prompt

curl -F file=@/tmp/log/callcontrol.log<mailto:file=@/tmp/log/callcontrol.log>

>From fs_cli

curl post file=%40%2Ftmp%2Flog%2Fcallcontrol.log
curl post -F file=%40%2Ftmp%2Fccv5%2Flog%2Fcallcontrol.log
curl post -F file=@/tmp/log/callcontrol.log<mailto:file=@/tmp/log/callcontrol.log>
curl post file=@/tmp/log/callcontrol.log<mailto:file=@/tmp/log/callcontrol.log>

All the above results in

<head><title>415 Unsupported Media Type</title></head>
<body bgcolor="white">
<center><h1>415 Unsupported Media Type</h1></center>

FreeSWITCH version
FreeSWITCH Version 1.1.beta1 (git-65c4f76 2012-04-25 17-58-41 +0000)


_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting at freeswitch.org<mailto:consulting at freeswitch.org> http://www.freeswitchsolutions.com   Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120427/c50d686f/attachment-0001.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list