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"><<a href="mailto:boris@tagnet.ru">boris@tagnet.ru</a>></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 <param name="script-directory"<br>
value="$${base_dir}/scripts/?"/> and restarted freeswitch. In my script<br>
called test1.lua I wrote: require('test2.lua');<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 'test2.lua' not found:<br>
no field package.preload['test2.lua']<br>
no file '/opt/fs/scripts/test2/lua'<br>
no file './test2/lua.so'<br>
no file './libtest2/lua51.so'<br>
no file '/usr/local/lib/lua/5.1/test2/lua.so'<br>
no file '/usr/local/lib/lua/5.1/libtest2/lua51.so'<br>
no file '/usr/local/lib/lua/5.1/loadall.so'<br>
no file './test2.so'<br>
no file './libtest251.so'<br>
no file '/usr/local/lib/lua/5.1/test2.so'<br>
no file '/usr/local/lib/lua/5.1/libtest251.so'<br>
no file '/usr/local/lib/lua/5.1/loadall.so'<br>
stack traceback:<br>
[C]: in function 'require'<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>