[OpenSIPS-Users] parameter <filename> not found in module <lua>

Gledhill, James james.gledhill at sipstorm.com
Wed Jun 13 22:12:43 CEST 2012


I read the source code and solved my own problem and am reporting back
for others, if/when needed.

 

Additionally, it would be good for someone to change the code or the
documentation.

 

modparam("lua", "filename", "/etc/opensips/opensips.lua") needs to be
...

modparam("lua", "luafilename", "/etc/opensips/opensips.lua") ...

 

Changing the parameter from "filename" to "luafilename"

 

Thanks

________________________________

From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Gledhill, James
Sent: Wednesday, June 13, 2012 1:57 PM
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] parameter <filename> not found in module <lua>

 

I am trying to test/work with the lua module, but having difficulties.  

 

When starting opensips I get the following error:

 

<25>: /usr/local/opensips_proxy/sbin/opensips -f
/usr/local/opensips_proxy/etc/opensips/opensips_jbg_test.cfg

Jun 13 14:40:37 [25953] ERROR:core:set_mod_param_regex: parameter
<filename> not found in module <lua>

Jun 13 14:40:37 [25953] CRITICAL:core:yyerror: parse error in config
file /usr/local/opensips_proxy/etc/opensips/opensips_jbg_test.cfg, line
90, column 20-21: Parameter <filename> not found in module <lua> - can't
set

Jun 13 14:40:37 [25953] ERROR:core:main: bad config file (1 errors)

 

----

/usr/local/opensips_proxy/etc/opensips/opensips_jbg_test.cfg has the
following:

 

... 

loadmodule "lua.so"

modparam("lua", "filename",
"/usr/local/opensips_proxy/etc/opensips/test.lua")  ## Line 90

...

 

-------

 

The lua file exists and has a function in it:

 

<26>: ls -la /usr/local/opensips_proxy/etc/opensips/test.lua

-rw-r--r-- 1 root root 68 Jun 13 14:24
/usr/local/opensips_proxy/etc/opensips/test.lua

 

<28>: cat /usr/local/opensips_proxy/etc/opensips/test.lua

-- test lua

 

function testFunction()

        xlog("test from lua\n");

end

 

------

 

Environment:  

  CentOS release 5.8 (Final) - 64-bit

  opensips 1.8

  Lua 5.1.4

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120613/fd6c9b90/attachment-0001.htm>


More information about the Users mailing list