<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
For example , you can to launch some lua script from FS dialplan and invoke linux command from lua via
<span style="font-family: sans-serif; line-height: 19px; background-color: rgb(255, 255, 255); ">io.popen()</span><div><a href="http://wiki.freeswitch.org/wiki/Mod_lua#Run_a_shell_command">http://wiki.freeswitch.org/wiki/Mod_lua#Run_a_shell_command</a> <br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: rml@tollfreeforwarding.com<br>To: freeswitch-users@lists.freeswitch.org<br>Date: Fri, 27 Apr 2012 00:01:30 +0000<br>Subject: [Freeswitch-users] File upload - mod_curl<br><br><style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri","sans-serif";}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass span.ecxEmailStyle17
{font-family:"Calibri","sans-serif";color:windowtext;}
.ExternalClass .ecxMsoChpDefault
{font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}
--></style><div class="ecxWordSection1"><p class="ecxMsoNormal">Hi </p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal">Please let me know how can I upload a file from fs_cli using curl or other http application of FreeSWITCH.</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"><u>From Linux command prompt</u></p><p class="ecxMsoNormal"><u><span style="text-decoration:none"> </span></u></p><p class="ecxMsoNormal">SUCCESS</p><p class="ecxMsoNormal">curl -F file=@/tmp/log/callcontrol.log <a href="http://192.168.9.152/upload" target="_blank">http://192.168.9.152/upload</a></p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"><u><span style="text-decoration:none"> </span></u></p><p class="ecxMsoNormal"><u>From fs_cli</u></p><p class="ecxMsoNormal"><u><span style="text-decoration:none"> </span></u></p><p class="ecxMsoNormal">curl http://192.168.9.152/upload post file=%40%2Ftmp%2Flog%2Fcallcontrol.log</p><p class="ecxMsoNormal">curl http://192.168.9.152/upload post -F file=%40%2Ftmp%2Fccv5%2Flog%2Fcallcontrol.log</p><p class="ecxMsoNormal">curl http://192.168.9.152/upload post -F <a href="mailto:file=@/tmp/log/callcontrol.log">file=@/tmp/log/callcontrol.log</a></p><p class="ecxMsoNormal">curl http://192.168.9.152/upload post <a href="mailto:file=@/tmp/log/callcontrol.log">file=@/tmp/log/callcontrol.log</a></p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal">All the above results in</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal"><html></p><p class="ecxMsoNormal"><head><title>415 Unsupported Media Type</title></head></p><p class="ecxMsoNormal"><body bgcolor="white"></p><p class="ecxMsoNormal"><center><h1>415 Unsupported Media Type</h1></center></p><p class="ecxMsoNormal"><hr><center>nginx/1.2.0</center></p><p class="ecxMsoNormal"></body></p><p class="ecxMsoNormal"></html></p><p class="ecxMsoNormal"><u><span style="text-decoration:none"> </span></u></p><p class="ecxMsoNormal"><u>FreeSWITCH version</u></p><p class="ecxMsoNormal">FreeSWITCH Version 1.1.beta1 (git-65c4f76 2012-04-25 17-58-41 +0000)</p><p class="ecxMsoNormal"> </p><p class="ecxMsoNormal">Thanks</p><p class="ecxMsoNormal">RaviRaj.</p></div><br>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org</div></div>                                            </div></body>
</html>