<div dir="ltr"><pre class="gmail-tw-data-text gmail-tw-ta gmail-tw-text-small" id="gmail-tw-target-text" style="height:144px" dir="ltr"><span lang="en">Thank you very much David, if you find the script it would be a great help.
I have been on vacation and I have not been able to try much more in this time.</span></pre><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="font-size:12.8px"><span style="font-size:small">2018-08-03 20:07 GMT+02:00 David Villasmil </span><span dir="ltr" style="font-size:small"><<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>></span><span style="font-size:small">:</span><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Oh this took me some time to figure out, i'll dig up ny script and share it with you.</p>
<br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Fri, Aug 3, 2018, 13:16 Jose David Jurado Alonso <<a href="mailto:josedavid@zennio.com" target="_blank">josedavid@zennio.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br>I have tried to make a HTTP POST request from LUA script but it does not work correctly in any way.<div><div><br></div><div>This is an example of the errors that I have obtained:
<div><br></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 2018-08-03 12:23:07.981581 [ERR] mod_lua.cpp:203 error loading module socket.core from file /usr/local/lib/lua/5.1/socket/<wbr>core.so:</font></div></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>/usr/local/lib/lua/5.1/socket/<wbr>core.so: undefined symbol: lua_pcall</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 stack traceback:</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>[C]: in ?</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>[C]: in function require</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>/usr/local/share/lua/5.1/<wbr>socket.lua:12: in main chunk</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>[C]: in function require</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>/usr/local/share/lua/5.1/<wbr>socket/http.lua:10: in main chunk</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>[C]: in function require</font></div></div></div></div><div><div><div><div><font face="times new roman, serif">09802b39-524f-4011-ada7-<wbr>418e6a870248 <span style="white-space:pre-wrap"> </span>/usr/share/freeswitch/scripts/<wbr>test.lua:3: in main chunk</font></div></div></div></div></blockquote><div><div><div><br></div></div><div><br></div><div>The lua script is:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="times new roman, serif">local http = require "socket.http";</font></div></div></div><div><div><div><font face="times new roman, serif"><br></font></div></div></div><div><div><div><font face="times new roman, serif">local req_url = "<a href="http://localhost/" target="_blank">http://localhost/</a>"</font></div></div></div><div><div><div><font face="times new roman, serif"><br></font></div></div></div><div><div><div><font face="times new roman, serif">http.request{</font></div></div></div><div><div><div><font face="times new roman, serif"> url = req_url,</font></div></div></div><div><div><div><font face="times new roman, serif"> method = "POST"</font></div></div></div><div><div><div><font face="times new roman, serif">}</font></div></div></div></blockquote><div><div><br></div><div><br></div><div>I tried several tutorials and several configurations:</div><div><br></div><div><ul><li><a href="https://freeswitch.org/confluence/display/FREESWITCH/Installing+LuaSocket" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>Installing+LuaSocket</a><br></li><li><a href="https://freeswitch.org/confluence/display/FREESWITCH/Third+Party+Libraries" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>Third+Party+Libraries</a> with <a href="https://luarocks.org/modules/jakeg/lua-requests" target="_blank"> https://luarocks.org/<wbr>modules/jakeg/lua-requests</a><br></li></ul><div>And some other things that I do not remember but always fail for some "undefined symbol".</div></div></div><div><br></div><div>Any ideas? Thanks!</div><div><br></div><div>José D.</div></div></div></div>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/<wbr>confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/<wbr>confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br></blockquote></div><br></div></div>