Hi,
On Tue, Jun 20, 2017 at 1:15 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
thanks for the reply. I just set up a test configuration for KEMI, and it does work when loading an external lua script. However, it would be nice if I could write my 5 lines of glue code (I have written a class for all my functions) within my kamailio.cfg. Is this somehow possible?
I don't really get what you mean here, can you provide more details/examples?
I start my kamailio.cfg with the usual lines:
listen=1.2.3.4:5060
loadmodule "lm.so" loadmodule "app_lua.so"
modparam [..]
Now in the examples in the modparam of kemi and app_lua a lua file gets loaded there. And after setting
cfgengine=lua
the kamailio.cfg ends. Everything else is done in this second file.
I was just wondering whether it would be possible to include the content of the second file into the kamailio.cfg file, so that I have only one configuration file. So after switching to lua as config language, I would go on writing something like this directly into kamailio.cfg:
foo = require "foo"
function ksr_request_route() [..] end
Is this possible? Or does the design of kemi explicitly demands a second file to be loaded?
The functions exported in the old way (not vi Kemi), are not listed in the rpc command response. If you try with master branch, sqlops has its functions also exported via Kemi and they will be listed via rpc.
I know that I can't find the old way functions via rpc. But what I found out later was that sqlops doesn't export to kemi in 5.0.2.
Are there already plans on abandoning the old way of including lua files? Or will both ways be available for quite a while? If I'm setting up a new system, I don't want something I have to completely redesign in the near future.
Best Regards, Sebastian