Before run Freeswitch you have to put this command:<br><br>export LUA_PATH=/usr/local/freeswitch/scripts/db_connect.lua<br><br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 10:34 AM, Boris Kovalenko <span dir="ltr">&lt;<a href="mailto:boris@tagnet.ru">boris@tagnet.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello!<br>
<br>
     I want to include LUA script into another LUA script. I have<br>
modified lua.conf.xml and set &lt;param name=&quot;script-directory&quot;<br>
value=&quot;$${base_dir}/scripts/?&quot;/&gt; and restarted freeswitch. In my script<br>
called test1.lua I wrote: require(&#39;test2.lua&#39;);<br>
test2.lua is placed into the same directory as test1.lua, and directory<br>
is /opt/fs/scripts/. But luarun test1.lua gives an error:<br>
  2011-04-19 10:14:40.651205 [ERR] mod_lua.cpp:182<br>
/opt/fs/scripts/test1.lua:3: module &#39;test2.lua&#39; not found:<br>
         no field package.preload[&#39;test2.lua&#39;]<br>
         no file &#39;/opt/fs/scripts/test2/lua&#39;<br>
         no file &#39;./test2/lua.so&#39;<br>
         no file &#39;./libtest2/lua51.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/test2/lua.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/libtest2/lua51.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/loadall.so&#39;<br>
         no file &#39;./test2.so&#39;<br>
         no file &#39;./libtest251.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/test2.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/libtest251.so&#39;<br>
         no file &#39;/usr/local/lib/lua/5.1/loadall.so&#39;<br>
stack traceback:<br>
         [C]: in function &#39;require&#39;<br>
         /opt/fs/scripts/test1.lua:3: in main chunk<br>
<br>
<br>
What is wrong with my setup?<br>
<br>
--<br>
Regards,<br>
Boris<br>
<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>Regards <br>---------- <br>M Emran<br><br>E-Mail: <a href="mailto:info@e-softbilling.com" target="_blank">info@e-softbilling.com</a><br>Web: <a href="http://www.e-softbilling.com/" target="_blank">www.e-softbilling.com</a><br>
         <a href="http://www.isoftswitch.com/" target="_blank">www.isoftswitch.com</a><br>
         <a href="http://www.howtonix.com/" target="_blank">www.howtonix.com</a><br>         <a href="http://www.sipmobiledialer.com/" target="_blank">www.sipmobiledialer.com</a><br>