<div dir="ltr">I&#39;ve seen stability problems reported on the list using luasql before. Personally I&#39;d use freeswitch.Dbh as Valliamamod suggests - it&#39;ll connect to any database that FS&#39;s DSN can which includes ODBC and native support for PostgreSQL and Sqlite, and takes advantage of the database pooling that FS provides that luasql won&#39;t.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On 13 July 2014 19:00, Peter Villeneuve <span dir="ltr">&lt;<a href="mailto:petervnv1@gmail.com" target="_blank">petervnv1@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Thanks <span style="font-family:arial,sans-serif;font-size:13px">Vallimamod.</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I will try to compile and let the list know if that solved it. I highly doubt I&#39;m the only one in this list using lua to connect to mysql with FS.</span></div>


<div><span style="font-family:arial,sans-serif;font-size:13px">I wonder if the problem is only with my setup since no one else seems to be having this problem.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>


</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Cheers,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Peter</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">

<br><br><div class="gmail_quote">
On Sun, Jul 13, 2014 at 6:33 PM, Vallimamod Abdullah <span dir="ltr">&lt;<a href="mailto:vma@440hz.fr" target="_blank">vma@440hz.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Peter,<br>
<br>
The lua_settop function is part of lua C api: <a href="http://www.lua.org/pil/24.2.3.html" target="_blank">http://www.lua.org/pil/24.2.3.html</a><br>
If you are using your system’s packaged lib, you may have a compatibility problem with the freeswitch shipped lua version. So you should try to compile your lua mysql lib from source with the lua source located in freeswitch/src/mod/languages/mod_lua/lua. First do ‘make linux’ in this directory to build the lua standalone interpreter and then, point to this directory as your lua source / include dir when compiling the mysql lib.<br>



<br>
Also, if you are already using a db with freeswith (native postgres or via odbc,) you should use definitely use freeswitch.Dbh (<a href="https://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.Dbh" target="_blank">https://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.Dbh</a>)<br>



<br>
Hope this help!<br>
<br>
Best Regards,<br>
Vallimamod<br>
.<br>
<div><div><br>
<br>
On 13 Jul 2014, at 18:27, Peter Villeneuve &lt;<a href="mailto:petervnv1@gmail.com" target="_blank">petervnv1@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Bump.<br>
&gt; Anyone seen this error before?<br>
&gt;<br>
&gt;<br>
&gt; On Sat, Jul 12, 2014 at 10:29 PM, Peter Villeneuve &lt;<a href="mailto:petervnv1@gmail.com" target="_blank">petervnv1@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m trying to use a lua script to grab voicemail PINs from Kamailio&#39;s db as shown here<br>
&gt;<br>
&gt; However, I get the following error message which is driving me nuts. Googling for the &quot;undefined symbol: lua_settop&quot; error message doesn&#39;t seem to return anything relevant, and looking around the FS wiki here didn&#39;t help either.<br>



&gt;<br>
&gt; [ERR] mod_lua.cpp:199 error loading module &#39;luasql.mysql&#39; from file &#39;/usr/lib/x86_64-linux-gnu/lua/5.1/luasql/mysql.so&#39;:<br>
&gt;        /usr/lib/x86_64-linux-gnu/lua/5.1/luasql/mysql.so: undefined symbol: lua_settop<br>
&gt; stack traceback:<br>
&gt;        [C]: in ?<br>
&gt;        [C]: in function &#39;require&#39;<br>
&gt;        /usr/local/freeswitch/scripts/sqluser.lua:14: in main chunk<br>
&gt; 2014-07-12 22:21:17.470474 [ERR] mod_lua.cpp:265 LUA script parse/execute error!<br>
&gt;<br>
&gt;<br>
&gt; Any ideas?<br>
&gt;<br>
&gt; Thanks<br>
<br>
</div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>