[Freeswitch-users] mod_lua

Michael Jerris mike at jerris.com
Fri Oct 3 19:18:59 MSD 2014


why do you have ?.lua at the end?  what happens if you don't include that?

On Oct 3, 2014, at 9:20 AM, Борисов, Дмитрий <bordmi at rarus.ru> wrote:

> I found some intrsting thing, maybe bug. I instruct mod_lua to seek for scripts in
> $${script_dir}/lua:
> 
> # cat lua.conf.xml
> <configuration name="lua.conf" description="LUA Configuration">
>   <settings>
> 
>     <param name="module-directory" value="/usr/local/lib/lua/5.1/?.so"/>
>     <param name="module-directory" value="/usr/local/lib/?.so"/>
>     <param name="script-directory" value="$${script_dir}/lua/?.lua"/>
> 
>     <param name="xml-handler-script" value="gen_dir_user_xml.lua"/>
>     <param name="xml-handler-bindings" value="directory"/>
> 
>   </settings>
> </configuration>
> 
> But in loading process i got next error message in logfile:
> 
> freeswitch.log:
> 2014-10-03 17:02:05.683593 [ERR] mod_lua.cpp:203 cannot open /usr/local/share/freeswitch/scripts/gen_dir_user_xml.lua: No such file or directory
> 2014-10-03 17:02:05.683599 [ERR] mod_lua.cpp:269 LUA script parse/execute error!
> 2014-10-03 17:02:05.683901 [ERR] mod_lua.cpp:203 cannot open /usr/local/share/freeswitch/scripts/gen_dir_user_xml.lua: No such file or directory
> 2014-10-03 17:02:05.683910 [ERR] mod_lua.cpp:269 LUA script parse/execute error!
> 2014-10-03 17:02:05.684191 [ERR] mod_lua.cpp:203 cannot open /usr/local/share/freeswitch/scripts/gen_dir_user_xml.lua: No such file or directory
> 2014-10-03 17:02:05.684196 [ERR] mod_lua.cpp:269 LUA script parse/execute error!
> 
> I put my lua scripts in right place (as described in config):
> # ls -la /usr/local/share/freeswitch/scripts/lua/gen_dir_user_xml.lua
> -rw-r--r--  1 root  wheel  1708  3 окт 16:17 /usr/local/share/freeswitch/scripts/lua/gen_dir_user_xml.lua
> 
> But FS seek for it in $${script_dir} place, where no my script:
> # ls -la /usr/local/share/freeswitch/scripts/gen_dir_user_xml.lua
> ls: /usr/local/share/freeswitch/scripts/gen_dir_user_xml.lua: No such file or directory
> 
> When my FF starts, it evals path from config right:
> freeswitch at voip-bsd-01.local> eval $${script_dir}/lua/
> /usr/local/share/freeswitch/scripts/lua/
> 
> I can solve this problem simply by putting script to $${script_dir} (I tried, it works), but after that i loose possibility to sort my scripts.
> 
> Any thinks about?
> 
> -- 
> Best regards,
>     Борисов Дмитрий



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list