[sr-dev] some missing kemi module functions

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 27 14:49:22 CEST 2019

And the functions for dialog vars are in latest master branch, -dev5 is a
bit older, last one has -dev6. Fetch latest master branch and try again.

On Thu, Jun 27, 2019 at 2:46 PM Daniel-Constantin Mierla <miconda at gmail.com>

> Hello,
> in short, all functions exported to native kamailio.cfg will be exported
> to KEMI if they don't have an (native) alternative in those scripting
> languages. If some are missing, that's because nobody did it so far for
> specific modules and maybe I missed some functions for modules that already
> have some exports to KEMI.
> Those from sdpops likely I missed them, I will export them. Then I am not
> sure why sipt was skipped, should be exported as well -- if nobody does it,
> I will do it sometime soon. For call_obj I already saw commits pushed to
> master. Variants of xlog functions could be missing, because was one of the
> first modules exported to KEMI, but with the commonly used (at least by me)
> functions, needed for testing, then probably I didn't approach again the
> module.
> Regarding the header operations, the remove, insert and append are
> exported via KSR.hdr submodule, not KSR.textops. It was how Lua had it in
> the previous version and when I started with KEMI, I worked on old lua
> module code. Maybe confusing a bit, anyhow the docs are at:
>   *
> https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/core/#ksrhdr-submodule
> Cheers,
> Daniel
> On Thu, Jun 27, 2019 at 12:07 PM David Escartin <descartin at sonoc.io>
> wrote:
>> hello all
>> we are trying to rewrite our code to lua kemi, and we have found some
>> issues/questions until we would like to share with you.
>> -module call_obj not exported, we have tested a patch for the module to
>> export the functions to kemi, which seems works fine
>> -KSR.xlog.xinfo seems not able to select a facility as we currently can
>> like xlog("LOG_LOCAL7", "L_NOTICE", "$var(xxxx)");
>> -module sipt not exported yet, must use ksr.x.modf ? will be exported for
>> a future version?
>> -on 5.3.0-dev5 we don't see the KSR.dialog.var_sets() and
>> KSR.dialog.var_get/e/w() functions in the code, so we do use KSR.pv
>> functions to set and retrieve those dialog vars. However i see them on
>> master branch. Which kamailio release would have them?
>> -sdpops function sdp_with_codecs_by_name seems to not me exported, is it
>> on a todo list?
>> -textops module, missing remove_hf and append_hf functions exported. We
>> already did a patch for the remove_hf, despite we could work with textopsx
>> remove_hf_value function to get the almost the same functionality.
>> However, with append_hf i'm having some more issues.
>> We cannot use modf to exec those funtions, we get something like
>> For ---> KSR.x.modf("append_hf", "User-Agent: test", "To");
>> I get something like ----> Jun 27 07:19:16 proxy-1
>> /usr/local/kamailio/sbin/kamailio[5525]: ERROR: app_lua [app_lua_sr.c:188]:
>> lua_sr_modf(): function 'append_hf' has fixup - cannot be used
>> I could append a new header and not only at the end of the message by
>> replacing a header called the same way, by doing something like
>> KSR.textopsx.insert_hf_value("header", "value");
>> KSR.textopsx.remove_hf_value("header[-1]");
>> but i'm not able to insert a header after another different one like we
>> can do with append_hf("header:value", "To") for instance.
>> Is it expected to have it on a next commit those append_hf and remove_hf
>> exported.
>> Would we do a pull request with the ki_remove_hf we already have and the
>> call_obj functions too? We can check to export append_hf too if it's not
>> planned to be done
>> thanks a lot and regards
>> david
>> _______________________________________________
>> Kamailio (SER) - Development Mailing List
>> sr-dev at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190627/8de1edac/attachment.html>

More information about the sr-dev mailing list