<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">a crash is always a bug,&nbsp;<a href="https://wiki.freeswitch.org/wiki/Reporting_Bugs">https://wiki.freeswitch.org/wiki/Reporting_Bugs</a><div><br></div><div><br><div style=""><div>On May 14, 2014, at 4:17 PM, Alex Lake &lt;<a href="mailto:alex@digitalmail.com">alex@digitalmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Got a script that uses Lua to hit a webserver while in the middle of a <br>call to get instructions on what to do next.<br><br>It usually works very well.<br><br>However, it seems that sometimes (possibly a slow response?) this can <br>cause freeswitch to fall over.<br>Any suggestions on ways to deal with this?<br><br>This is FreeSWITCH Version 1.2.15+git~20131210T171529Z~fa43a37a82~64bit <br>(git fa43a37 2013-12-10 17:15:29Z 64bit)<br><br>Thinks: From that version, I'm wondering if an update to latest stable <br>release might be in order!<br><br>But I'll post this anyway...<br><br>I'm using luacurl with the following bit of Lua:<br><br> &nbsp;&nbsp;&nbsp;&nbsp;c = curl.new()<br> &nbsp;&nbsp;&nbsp;&nbsp;text = {}<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_URL,cc_url)<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_USERAGENT, "luacurl-agent/1.0")<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_HTTPGET, true)<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_CONNECTTIMEOUT, 1)<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_TIMEOUT, 1)<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_ENCODING, "utf8")<br> &nbsp;&nbsp;&nbsp;&nbsp;c:setopt(curl.OPT_WRITEFUNCTION, WriteMemoryCallback)<br> &nbsp;&nbsp;&nbsp;&nbsp;c:perform()<br> &nbsp;&nbsp;&nbsp;&nbsp;c:close()<br> &nbsp;&nbsp;&nbsp;&nbsp;Rsp = table.concat(text,'')<br><br><br>with....<br><br>function WriteMemoryCallback(userparam,s)<br> &nbsp;&nbsp;&nbsp;&nbsp;if s then<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text[#text+1] = s<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return string.len(s)<br> &nbsp;&nbsp;&nbsp;&nbsp;else<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0<br> &nbsp;&nbsp;&nbsp;&nbsp;end<br>end<br><br>So any suggestions on further diagnostics that I should post (is there a <br>stacktrace or anything similar available?)<br><br>Or just observations on whether getting Lua to do such tricks is <br>inadvisable and there is a better way!<br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>