<div dir="ltr">Tried the other way as well (without the API)<div><br></div><div><div>session:execute("curl", "<a href="http://myurl.com/test3.php">http://myurl.com/test3.php</a> post name=myname")</div><div>curl_response_code = session:getVariable("curl_response_code")</div><div>curl_response = session:getVariable("curl_response_data")</div></div><div><br></div><div>Getting this error:</div><div><br></div><div><div>[ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/test.lua:1: attempt to index global 'session' (a nil value)</div><div>stack traceback:</div><div> /usr/share/freeswitch/scripts/test.lua:1: in main chunk</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 2:51 PM, Don Hawkins <span dir="ltr"><<a href="mailto:hawkins@hawkinsegroup.com" target="_blank">hawkins@hawkinsegroup.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>root@debian:/usr/share/<wbr>freeswitch/scripts# vi test.lua</div><div><br></div><div>api = freeswitch.API();</div><div>api:execute("curl", "<a href="http://myurl.com/test3.php" target="_blank">http://myurl.com/test3.php</a> post name1=value1")</div><div><br></div><div><br></div><div>Snatched the code straight from the the example shown at the URL below. FS does execute the script but never reaches my URL with the POST request. Did I miss something?</div><div><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_curl" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>mod_curl</a><br></div><div><br></div><div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(102,102,102)"><span>Sincerely,<br>Don Hawkins<br>CEO<br>Hawkins Enterprise Group LLC<br><a href="http://hawkinsegroup.com" target="_blank">http://hawkinsegroup.com</a><br><a href="http://zello.com" target="_blank">Zello PTT</a>: push2don<br></span></span></div><div><span style="color:rgb(102,102,102)"><span>P: 469-214-5044<br></span></span></div><div dir="ltr"><span style="color:rgb(102,102,102)"><span><a value="+12146991224"></a></span></span></div></div></div></div></div></div>
</div>