[SR-Users] Lua script reload

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 14 10:13:42 CET 2018


Again, wrote in previous response, if you are looking for has_totag(),
you look at the wrong module.

However, regarding the exports, you are using a version during devel
phase, upgrade to latest stable 5.1.x and you will get more exported
functions.

On the other hand, for some of the functions related to string
search/comparison, I put lower priority, because they can be done in the
scripting language itself - Lua has more operations and functions for
string handling that we have in our modules. I do not recall by heart
right now if I exported all of them at the end, but there are more than
you listed here in 5.1.2.

Cheers,
Daniel

On 13.03.18 15:57, Igor Olhovskiy wrote:
> For textops.
>
> Seems textops module not exporting everything to Lua
>
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.search(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.search_body(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.search_hf(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.is_present_hf(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.subst(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.subst_uri(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.subst_user(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.subst_body(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.subst_hf(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.remove_hf_re(...)
> app_lua [app_lua_sr.c:1961]: lua_sr_kemi_register_libs(): exporting
> KSR.textops.remove_hf_exp(...)
> app_lua [app_lua_sr.c:1975]: lua_sr_kemi_register_libs(): initializing
> kemi sub-module: KSR.textops (textops)
>
>
> Regards, Igor
>
> On Mar 13, 2018, 4:03 PM +0200, Igor Olhovskiy
> <igorolhovskiy at gmail.com>, wrote:
>> Hi!
>>
>> I’m playing with new KEMI framework and trying to reload script
>> without reloading Kamailio.
>>
>> Lua code is mostly one from example.
>>
>> ...
>> modparam("app_lua", "load", "/etc/kamailio/lua/kamailio.lua")
>> cfgengine "lua"
>> ...
>>
>> So, I’m changing lua code and giving command
>>
>> kamctl rpc app_lua.reload
>>
>> But in the answer
>>
>> {
>>   "jsonrpc":  "2.0",
>>   "error":  {
>>     "code": -32000,
>>     "message":  "Execution Error"
>>   },
>>   "id": 11098
>> }
>>
>> In syslog there is a string 
>>
>> /usr/sbin/kamailio[10939]: ERROR: app_lua [app_lua_api.c:399]:
>> lua_sr_reload_script(): reload is not activated
>>
>>
>> What is need to be done to activate reload?
>>
>>
>> Regards, Igor
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180314/a264132c/attachment.html>


More information about the sr-users mailing list