<div dir="ltr"><div>I have a myself writed script, it must read data from database and create XML config for FS. For creating XML I using genx library, it was installed by luarocks. This library worked fine when I use it in standalone scripts, but when I use it in FS I`ve got next error (I`ve put there bigger part of freeswitch.log for better explanation):</div><div><br></div><div>2014-10-07 15:34:02.010800 [INFO] switch_cpp.cpp:1328 package.path /usr/local/share/freeswitch/scripts/lua/?.lua package.cpath /usr/local/lib/lua/5.1/?.so;/usr/local/lib/?.so</div><div>2014-10-07 15:34:02.010848 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, provided params:</div><div>'Event-Name: GENERAL</div><div>Core-UUID: ed5920d2-154e-e411-b150-005056a83c1f</div><div>FreeSWITCH-Hostname: voip-bsd-01.local</div><div>FreeSWITCH-Switchname: voip-bsd-01.local</div><div>FreeSWITCH-IPv4: xxx.xxx.xxx.xxx</div><div>FreeSWITCH-IPv6: %3A%3A1</div><div>Event-Date-Local: 2014-10-07%2015%3A34%3A02</div><div>Event-Date-GMT: Tue,%2007%20Oct%202014%2011%3A34%3A02%20GMT</div><div>Event-Date-Timestamp: 1412681642009651</div><div>Event-Calling-File: switch_core.c</div><div>Event-Calling-Function: switch_load_network_lists</div><div>Event-Calling-Line-Number: 1393</div><div>Event-Sequence: 397</div><div>domain: <a href="http://company1.xxxx.com">company1.xxxx.com</a></div><div>purpose: network-list</div><div><br></div><div>'</div><div>2014-10-07 15:34:02.010858 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua:</div><div>XML_REQUEST[section]:directory</div><div>XML_REQUEST["tag_name"]:domain</div><div>XML_REQUEST["key_name"]:name</div><div>XML_REQUEST["key_value"]:<a href="http://company1.xxxx.com">company1.xxxx.com</a></div><div>2014-10-07 15:34:02.016535 [DEBUG] freeswitch_lua.cpp:360 DBH handle 0x80c32d0f0 Connected.<br></div><div>2014-10-07 15:34:02.016916 [ERR] mod_lua.cpp:203 error loading module 'genx' from file '/usr/local/lib/lua/5.1/genx.so':</div><div> /usr/local/lib/lua/5.1/genx.so: Undefined symbol "lua_call"</div><div>stack traceback:</div><div> [C]: in ?</div><div> [C]: in function 'require'</div><div> .../local/share/freeswitch/scripts/lua/gen_dir_user_xml.lua:202: in main chunk</div><div>2014-10-07 15:34:02.016923 [ERR] mod_lua.cpp:269 LUA script parse/execute error!</div><div><br></div><div>My lua.conf.xml:</div><div><br></div><div><div><configuration name="lua.conf" description="LUA Configuration"></div><div> <settings></div><div> <param name="module-directory" value="/usr/local/lib/lua/5.1/?.so"/><br></div><div> <param name="module-directory" value="/usr/local/lib/?.so"/></div><div> <param name="script-directory" value="$${script_dir}/lua/?.lua"/><br></div><div> <param name="xml-handler-script" value="lua/gen_dir_user_xml.lua"/><br></div><div> <param name="xml-handler-bindings" value="directory"/></div><div> </settings><br></div><div></configuration></div></div><div><br></div><div><br></div><div>I`d attached script because it is large.</div><div><br></div><div>Any thinks about methods for solving problem?</div><div><br></div>-- <br><div dir="ltr">best regards, </div><div dir="ltr">Dmitriy Borisov</div>
</div>