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
email: [email protected]
phone: +34669448337


On Tue, May 3, 2022 at 12:01 PM David Villasmil <
[email protected]> 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
> email: [email protected]
> phone: +34669448337
>
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to