Hi,
I use KEMI/Lua. I have simple lua class:
myclass = {}
myclass.event = function()
KSR.xlog.xinfo("Event working...\n")
end
In kamailio.conf have:
modparam("xhttp", "event_callback", "myclass.event")
In debug log have:
Mar 12 13:21:30 kamailio DEBUG: app_lua [app_lua_api.c:549]: sr_lua_reload_script(): No
need to reload [/etc/kamailio/donjon.lua] is version 0
Mar 12 13:21:30 kamailio DEBUG: app_lua [app_lua_api.c:733]: app_lua_run_ex(): executing
Lua function: [[myclass.event]]
Mar 12 13:21:30 kamailio DEBUG: app_lua [app_lua_api.c:735]: app_lua_run_ex(): lua top
index is: 40
Mar 12 13:21:30 kamailio DEBUG: app_lua [app_lua_mod.c:164]: sr_kemi_config_engine_lua():
execution of route type 513 with name [myclass.event] returned 1
The problem is that the event function in the myclasses class is not called.
Is there any other way or syntax to do this? Of course, if I define a function without a
class, it works.
Thanks
Michal
Show replies by date