Friday, May 31, 2019

New Kamailio module – app_lua_sr

A new module named app_lua_sr has been pushed to git master branch. It collects the functions that correspond to the Lua srlibrary, previously exported from app_lua module:
The Lua sr library is the old way of exposing Kamailio API to Lua scripting. With the introduction of KEMI in Kamailio v5.0, the KSR library has been exported to Lua, with a larger set of functions, therefore over the time app_lua_sr will be deprecated and removed. Splitting the code from app_lua that is no longer needed for KEMI is the first step in this process.
If you are using sr library in your Lua script, consider to migrate to KEMI alternatives offered by KSR library. For now you can still keep your old Lua script with sr library, requiring following updates to kamailio.cfg:
# old config
loadmodule ""
modparam("app_lua", "register", "sl")
# new config
loadmodule ""
loadmodule ""
modparam("app_lua_sr", "register", "sl")
If you find a function available in Lua sr library but not in Lua KSR library, contact us via mailing lists or open an issue on github tracker.
Thanks for flying Kamailio!

No comments:

Post a Comment