[SR-Users] function 'sl_send_reply' is not available

David Villasmil david.villasmil.work at gmail.com
Wed May 4 09:34:53 CEST 2022


Cool, thanks!

On Tue, 3 May 2022 at 14:27, Yuriy Gorlichenko <ovoshlook at gmail.com> wrote:

> Done it for myself but might be will be useful too:
> There are some helpers and tools might be reused for some who uses lua
> https://github.com/ovoshlook/kemi-lua-utils-and-tools
>
> вт, 3 мая 2022 г. в 13:28, David Villasmil <david.villasmil.work at gmail.com
> >:
>
>> 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: david.villasmil.work at gmail.com
>> phone: +34669448337
>>
>>
>> On Tue, May 3, 2022 at 12:01 PM David Villasmil <
>> david.villasmil.work at 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
>>> email: david.villasmil.work at gmail.com
>>> phone: +34669448337
>>>
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users at lists.kamailio.org
>> 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
>>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> 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
>
-- 
Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220504/9647fedd/attachment.htm>


More information about the sr-users mailing list