Hello guys,

To answer my own question and leave here for help:

I was using sl_send_reply like:

function send_reply()
    KSR.log("err","error log message from embedded interpreter\n");
    KSR.sl.modf("sl_send_reply", "200", "OK");
end

but sl_send_reply is not used like that, if you go to
https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#sl
(you can find documentation for all modules here)

you'll see that i must be used like:

KSR.sl.sl_send_reply("200", "OK");

And now it works great.


Thanks everyone!

David Villasmil
phone: +34669448337


On Tue, May 3, 2022 at 12:01 PM David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello guys,

I'm starting to try KEMI and i already hit a snag... right now i'm simply testing with:


loadmodule "app_lua.so"
modparam("app_lua", "load", "/etc/kamailio/myscript.lua")
cfgengine "lua"
route {
  lua_run("send_reply");
}

But i'm always getting:

0(118) ERROR: app_lua [app_lua_api.c:1633]: sr_kemi_lua_modf(): function 'sl_send_reply' is not available


I'm guessing that function is not exported by the module.. if that's the case, how can i use it?

Regards,

David Villasmil
phone: +34669448337