Re: [SR-Users] KEMI - app_python3 - reload multiple python files

2022-11-15 Thread Daniel-Constantin Mierla
onday, November 14, 2022 10:46 > *To:* Henning Westerholt ; Kamailio (SER) - Users > Mailing List > *Subject:* Re: [SR-Users] KEMI - app_python3 - reload multiple python > files >   > Hi, > > that is what we do: > > import sys > import KSR as KSR > im

Re: [SR-Users] KEMI - app_python3 - reload multiple python files

2022-11-15 Thread Niklas Larsson
e top. HTH Sebastian *From:* sr-users on behalf of Niklas Larsson *Sent:* Monday, November 14, 2022 10:46 *To:* Henning Westerholt ; Kamailio (SER) - Users Mailing List *Subject:* Re: [SR-Users] KEMI - app_python3 - reload multiple python files Hi, that is what we do: import sys impo

Re: [SR-Users] KEMI - app_python3 - reload multiple python files

2022-11-15 Thread sdamm
esterholt ; Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] KEMI - app_python3 - reload multiple python files Hi, that is what we do: import sys import KSR as KSR import constants import endpointparam as epParam import iendpoint as ep from util import ParseAddress

Re: [SR-Users] KEMI - app_python3 - reload multiple python files

2022-11-14 Thread Niklas Larsson
Hi, that is what we do: import sys import KSR as KSR import constants import endpointparam as epParam import iendpoint as ep from util import ParseAddress from endpoint import GetEgressEndPointInstance, CreateAsteriskEndPoint, CreateSipTrunkEndPoint etc Been googling a bit, and it's should b

Re: [SR-Users] KEMI - app_python3 - reload multiple python files

2022-11-14 Thread Henning Westerholt
Hello, have you tried to just use "import my-file" the file my-file in your kamailio.py? Cheers, Henning -- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.com -Original Message- From: sr-users On Behalf Of Niklas Larsson Sent: Friday, November 11,

Re: [SR-Users] KEMI Python Syntax

2022-05-30 Thread Daniel-Constantin Mierla
Hello, there is not such KSR.py file at this moment, but maybe you can start from the script made for Lua:   - https://github.com/kamailio/kamailio/blob/master/misc/tools/kemi/lua/kemiksrlib.py and adapt it for Python. The one above generates something similar for Lua. You can play with it in th

Re: [SR-Users] KEMI jsdt CommonJS-based module

2022-02-28 Thread Ian Carlson
, February 24, 2022 11:42 PM To: Ian Carlson ; 'Kamailio (SER) - Users Mailing List' Subject: Re: [SR-Users] KEMI jsdt CommonJS-based module Hello, I just merged the pull request, thanks! I had some remarks/questions in a comment made on PR, let me post them here for discussi

Re: [SR-Users] KEMI jsdt CommonJS-based module

2022-02-24 Thread Daniel-Constantin Mierla
aniel-Constantin Mierla > *Sent:* Monday, February 21, 2022 4:44 AM > *To:* Kamailio (SER) - Users Mailing List > ; Ian Carlson > *Subject:* Re: [SR-Users] KEMI jsdt CommonJS-based module > >   > > Hello, > > I didn't notice that require() was not in the duktape 2.x

Re: [SR-Users] KEMI jsdt CommonJS-based module

2022-02-23 Thread Ian Carlson
lio (SER) - Users Mailing List ; Ian Carlson Subject: Re: [SR-Users] KEMI jsdt CommonJS-based module Hello, I didn't notice that require() was not in the duktape 2.x, I will try to add support for module-duktape when I get a chance. If someone wants to do it, pull requests are welcome --

Re: [SR-Users] KEMI jsdt CommonJS-based module

2022-02-21 Thread Daniel-Constantin Mierla
Hello, I didn't notice that require() was not in the duktape 2.x, I will try to add support for module-duktape when I get a chance. If someone wants to do it, pull requests are welcome -- it does not seem to be complex:   * https://github.com/svaarala/duktape/tree/master/extras/module-duktape Th

Re: [SR-Users] KEMI Golang

2021-11-24 Thread Daniel-Constantin Mierla
Hello, KEMI is for interpreted scripting languages, like lua, python, ruby. Golang compiles to native executable. In golang one can write libraries which can then be used by kamailio modules, like it is done now by secsipid/secsipid_proc. Cheers, Daniel On 23.11.21 13:02, Eugeniu Istrati wrote:

Re: [SR-Users] KEMI - Set message body to Bytes / Prevent parsing PV?

2021-04-13 Thread Daniel-Constantin Mierla
Hello, using KSR.pvx.evalx("$uac_req(body)", "$smsbody") works fine as long as there is no '$...' inside $smsbody, because the second parameter is evaluated twice for variables. That's the reason I gave the example with $$(smsbody), so first time $$ is evaluate to $, resulting in $(smsbody), which

Re: [SR-Users] KEMI - Set message body to Bytes / Prevent parsing PV?

2021-04-12 Thread Nick
Thanks Daniel, KSR.pvx.evalx was exactly what I needed, I was able to set the UAC request body to an existing PV without evaluating it in Python, KSR.pvx.evalx("$uac_req(body)", "$smsbody"); Thanks again, Nick On Mon, Apr 12, 2021 at 6:21 PM Daniel-Constantin Mierla wrote: > Hello, > On 11.04

Re: [SR-Users] KEMI - Set message body to Bytes / Prevent parsing PV?

2021-04-12 Thread Daniel-Constantin Mierla
Hello, On 11.04.21 05:23, Nick wrote: > Hi all, > > I'm trying in KEMI & Python to set a Pseudo Variable to the value of > another PV (simple enough) but the value of the PV is not a string or > an integer, > > For example the SMSops >

Re: [SR-Users] Kemi execute a route from configuration file

2021-01-22 Thread Arsen Semenov
Hi, I think you haven't dreamed it, here was a thread called kemi - native mixing, as I remember, where Daniel explained that it should be possible to call routes from KEMI using KSR.cfgutils.route_if_exists() or KSR.route(). On Fri, Jan 22, 2021 at 3:39 PM David VILLAUME wrote: > Hello, > > >

Re: [SR-Users] KEMI and Native mixing

2020-10-26 Thread Daniel-Constantin Mierla
Hello, adding a bit more on this topic: it should be also possible to execute native config routing blocks from KEMI using KSR.cfgutils.route_if_exists() or KSR.route(). Just test before when combining use of route or event_route (especially for this ones) from KEMI, to be sure that the condition

Re: [SR-Users] KEMI and Native mixing

2020-10-22 Thread Arsen Semenov
Hi Marcin, As a bit addition to the above comments once you set cfgengine to your prefered lang the routes become the language's functions which should be defined, but you still can keep some "event-routes" in native kamailio language, they are being initialised at startup. If you migrate a large

Re: [SR-Users] KEMI and Native mixing

2020-10-22 Thread Marcin Kowalczyk
Hi, Thanks for your reply. I have quite a large and complex kamailio.cfg and it would be quite a challenging task to migrate it in one go. This is the reason why I was thinking to do it block by block to be sure it will not break a logic. Regards Marcin On Wed, Oct 21, 2020 at 8:16 PM Henning W

Re: [SR-Users] KEMI and Native mixing

2020-10-22 Thread Yuriy Gorlichenko
It is not a big deal to use it with lua_run(). It will work without any double_trouble in general I do it a lot in many projects which are still in native lang but already need some extensions I would recommend you to test your Lua before set into production. Here is a test suite which can help yo

Re: [SR-Users] KEMI and Native mixing

2020-10-21 Thread Henning Westerholt
Hello, other people might be able to add more, but what you can certainly can do is to have a usual kamailio.cfg and then use e.g. lua_run(..) to execute some functions defined in the loaded lua script. In my opinion you will add some more complexity if you start to mix also the routes, but it

Re: [SR-Users] KEMI - "record_route_advertised_address" - function export or alternative

2020-04-08 Thread Daniel-Constantin Mierla
Hello, somehow exporting the function was overlooked. I just pushed a commit for it:   * https://github.com/kamailio/kamailio/commit/66582c49ee16a15a6859bfb094c2faaed7960d4d Can you test and see if works as expected? On the other hand, are you aware of the listen parameter with advertised addre

Re: [SR-Users] kemi framework design

2019-11-12 Thread Alex Balashov
On Tue, Nov 12, 2019 at 04:17:25PM -0500, GG GG wrote: > - about the safety, I just made a bad lua module in c, to force a > segmentation fault in the module. > I would expect kamailio to protect itself from the crash, but kamailio > restarted. The practicality of that is extremely limited; what

Re: [SR-Users] KEMI dialplan dp_replace returns not implemented yet

2019-09-26 Thread Grant Bagdasarian
Hi Daniel, Sorry for the late reply. The fix is working. Tested with Kamailio 5.3.0~pre1+0~20190926005451.1497+stretch from latest master nightly Debian repo. Thanks! Regards, Grant On Wed, Sep 25, 2019 at 3:19 PM Daniel-Constantin Mierla wrote: > > Just pushed the fix to master branch, can yo

Re: [SR-Users] KEMI dialplan dp_replace returns not implemented yet

2019-09-25 Thread Daniel-Constantin Mierla
Just pushed the fix to master branch, can you test with it? If all ok, it will be backported. Cheers, Daniel On 25.09.19 15:06, Grant Bagdasarian wrote: > Thanks Daniel! > > Do you want me to create a github issue for this? > > Regards, > > Grant > > On Wed, 25 Sep 2019 at 12:57, Daniel-Constanti

Re: [SR-Users] KEMI dialplan dp_replace returns not implemented yet

2019-09-25 Thread Grant Bagdasarian
Thanks Daniel! Do you want me to create a github issue for this? Regards, Grant On Wed, 25 Sep 2019 at 12:57, Daniel-Constantin Mierla wrote: > Hello, > > the functions is exported to KEMI but it seems that the app_python3 does > not support yet the sequence of parameter types (int, str, str)

Re: [SR-Users] KEMI dialplan dp_replace returns not implemented yet

2019-09-25 Thread Daniel-Constantin Mierla
Hello, the functions is exported to KEMI but it seems that the app_python3 does not support yet the sequence of parameter types (int, str, str) -- it was somehow forgotten, I will look into it soon. Cheers, Daniel On 24.09.19 23:02, Grant Bagdasarian wrote: > Hello, > > The dp_replace KEMI funct

Re: [SR-Users] KEMI beginner question on alpine Linux

2019-07-16 Thread Karsten Horsmann
Hi Nathan, Thanks for fast reply and a patch also. BTW: Did you see my issue report about the MI commands in the openrc init reload? https://gitlab.alpinelinux.org/alpine/aports/issues/10674 Nathan Angelacos schrieb am Di., 16. Juli 2019, 01:29: > On Mon, 2019-07-15 at 20:39 +0200, Karsten Ho

Re: [SR-Users] KEMI beginner question on alpine Linux

2019-07-15 Thread Nathan Angelacos
On Mon, 2019-07-15 at 20:39 +0200, Karsten Horsmann wrote: > Hi List, > I play around with alpine Linux 3.10.x and Kamailio 5.2.x and I > search for app_python3 and KEMI support. But I don't found it. > > AFAIK if I want to use KEMI with Python3 I need of course Kamailio > and app_python3 (maybe

Re: [SR-Users] KEMI beginner question on alpine Linux

2019-07-15 Thread Jeff Bilyk
Hi Karsten, You can locate the maintainer here: https://git.alpinelinux.org/aports/tree/main/kamailio/APKBUILD. The maintainer of the package is Nathan Angelacos, Jeff On Mon, Jul 15, 2019 at 2:40 PM Karsten Horsmann wrote: > Hi List, > > I play around with alpine Linux 3.10.x and Kamailio 5.

Re: [SR-Users] KEMI beginner question on alpine Linux

2019-07-15 Thread Sergey Safarov
Hello Karsten Please open issue on github about this request. On Mon, Jul 15, 2019 at 9:39 PM Karsten Horsmann wrote: > Hi List, > > I play around with alpine Linux 3.10.x and Kamailio 5.2.x and I search for > app_python3 and KEMI support. But I don't found it. > > AFAIK if I want to use KEMI wi

Re: [SR-Users] KEMI Ruby - exit from within function

2019-03-23 Thread Daniel-Constantin Mierla
Thanks for testing and reporting the results. I will backport to 5.2 branch. Cheers, Daniel On 23.03.19 05:16, Andrew White wrote: > Thanks so much for your quick response and fix Daniel! > > This works perfectly! I’ve come across another minor bug around > KEMI/Ruby, but I’ll post it to GitHub i

Re: [SR-Users] KEMI Ruby - exit from within function

2019-03-22 Thread Andrew White
Thanks so much for your quick response and fix Daniel! This works perfectly! I’ve come across another minor bug around KEMI/Ruby, but I’ll post it to GitHub issues. See you at Kamailio World in a few weeks, looks like I owe you a beer! Cheers, Andrew White - D

Re: [SR-Users] KEMI Ruby - exit from within function

2019-03-22 Thread Daniel-Constantin Mierla
Hello, can you try with latest master or pick the next commit in your local clone?   * https://github.com/kamailio/kamailio/commit/97189d7508a3946c2b3de49c178614356d816508 I just pushed it trying to catch the exception triggered by 'exit' and don't log error messages in that case. Cheers, Danie

Re: [SR-Users] KEMI: accessing "keyword" variables from core

2018-07-23 Thread Enrico Bandiera
Noticed there's KSR.is_myself for some reason the search functionality on the KEMI documentation didn't find it when searching for "myself" Thanks 2018-07-23 10:53 GMT+02:00 Enrico Bandiera : > Hi Daniel, thank you, any hint for the keyword "myself"? > > 2018-07-20 14:59 GMT+02:00 Daniel-Consta

Re: [SR-Users] KEMI: accessing "keyword" variables from core

2018-07-23 Thread Enrico Bandiera
Hi Daniel, thank you, any hint for the keyword "myself"? 2018-07-20 14:59 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > all the keywords should have corresponding variables, in these cases: > > - dst_port should be $Rp (received on port) > > - src_port should be $sp > > You can look in th

Re: [SR-Users] KEMI: accessing "keyword" variables from core

2018-07-20 Thread Daniel-Constantin Mierla
Hello, all the keywords should have corresponding variables, in these cases:   - dst_port should be $Rp (received on port)   - src_port should be $sp You can look in the pseudo-variables cookbook on kamailio.org/wiki to confirm. Cheers, Daniel On 20.07.18 12:48, Enrico Bandiera wrote: > Hi,

Re: [SR-Users] KEMI routing script Python exceptions with empty traceback

2018-06-19 Thread Michael Loughrey
I confirmed that the issue was the missing return values for ksr_dialog_event() and ksr_htable_event(). Once added the exception errors no longer occur. Thanks for the help. Cheers Mike On Mon, 18 Jun 2018 at 21:26, Michael Loughrey wrote: > Thanks for the tip Anthony. I do indeed have a couple

Re: [SR-Users] KEMI routing script Python exceptions with empty traceback

2018-06-18 Thread Michael Loughrey
Thanks for the tip Anthony. I do indeed have a couple of ksr_ routines returning no value. >From kamailio.cfg ### Routing Logic modparam("xhttp", "event_callback", "ksr_xhttp_event") modparam("htable", "event_callback_mode", 1) modparam("htable", "event_callback", "ksr_htable_event"

Re: [SR-Users] KEMI routing script Python exceptions with empty traceback

2018-06-18 Thread Anthony Alba
On Mon, Jun 18, 2018 at 12:05:34PM -0400, Michael Loughrey wrote: > > > kamailio[2242]: 8(2253) ERROR: app_python [python_support.c:150]: > python_handle_exception(): python_exec2: Unhandled exception in the Python > code: > kamailio[2242]: TypeError: an integer is required > Hi Michael, Thi

Re: [SR-Users] KEMI get_body_part

2018-04-02 Thread Igor Olhovskiy
Actual packet INVITE sip:555@172.31.1.100:5060;transport=UDP SIP/2.0 Via: SIP/2.0/UDP X.X.X.X:35111;branch=z9hG4bK-524287-1---d6f4a1cf0574662e;rport Max-Forwards: 70 Contact: To: From: ;tag=a328380c Call-ID: WPgNxs-lKSWCNLzPGbQ9Zw.. CSeq: 1 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER,

Re: [SR-Users] KEMI get_body_part

2018-04-02 Thread Igor Olhovskiy
No, it’s only application/sdp. Will use $rb, thanks Regards, Igor On Apr 2, 2018, 9:28 AM +0300, Daniel-Constantin Mierla , wrote: > Hello, > > On 30.03.18 14:44, Igor Olhovskiy wrote: > > Hi! > > > > I’m trying to get SDP body in my var. > > > > I’m using smth like this > > > >     if (KSR.text

Re: [SR-Users] KEMI get_body_part

2018-04-01 Thread Daniel-Constantin Mierla
Hello, On 30.03.18 14:44, Igor Olhovskiy wrote: > Hi! > > I’m trying to get SDP body in my var. > > I’m using smth like this > >     if (KSR.textops.has_body() ~= -1 and > KSR.textops.has_body_type("application/sdp") ~= -1) then >         KSR.textops.get_body_part("application/sdp", "$var(pbody)»

Re: [SR-Users] KEMI and SQL - best practices

2018-04-01 Thread Daniel-Constantin Mierla
Hello, if you use sqlops module, one connection is created at startup. If you want to use the scripting language libs to connect to db, then you can rely on a global variable to do the connection only first time is needed, like: global dbcon = 0; if(dbcon == 0) {    // connect to db    dbcon

Re: [SR-Users] KEMI basic logging

2018-03-30 Thread Daniel-Constantin Mierla
Hello, indeed, the function required KSR.log() two parameters and only one was provided in the first example. I added a commit with some extra checks to detect such case. Cheers, Daniel On 30.03.18 08:39, Eugene Prokopiev wrote: > I need to call KSR.log("err", "...") or just KSR.err("...") or e

Re: [SR-Users] KEMI basic logging

2018-03-29 Thread Eugene Prokopiev
I need to call KSR.log("err", "...") or just KSR.err("...") or even KSR.info("...") with debug=2 in kamailio.cfg 2018-03-29 22:23 GMT+03:00 Eugene Prokopiev : > Hi, > > Tried just to reject any request with some log message: > > $ cat kamailio/Dockerfile > > FROM centos:centos7 > RUN yum update -y

Re: [SR-Users] KEMI

2018-02-15 Thread Samuel F .
Yes, that is correct, they are manually documented. // Samuel From: sr-users on behalf of Grant Bagdasarian Sent: Thursday, February 15, 2018 11:51 To: mico...@gmail.com; Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] KEMI Hi Daniel, Thanks

Re: [SR-Users] KEMI

2018-02-15 Thread Grant Bagdasarian
Mailing List Subject: Re: [SR-Users] KEMI To add a bit more ... The list of the methods exported to KSR module in python (or any other KEMI scripting language) are listed at: - http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/ There is a python script contributed that scans the C

Re: [SR-Users] KEMI

2018-02-15 Thread Daniel-Constantin Mierla
ex.so...@timenet.it>> > Cc: Kamailio (SER) - Users Mailing List > mailto:sr-users@lists.kamailio.org>> > Subject: Re: [SR-Users] KEMI > > I am more into Lua when it comes on doing something the native > kamailio.cfg cannot do, that's because

Re: [SR-Users] KEMI

2018-02-14 Thread Anthony Alba
gt; From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of > Daniel-Constantin Mierla > Sent: woensdag 7 februari 2018 16:02 > To: Aleksandar Sosic > Cc: Kamailio (SER) - Users Mailing List > Subject: Re: [SR-Users] KEMI > > I am more into Lua when it comes

Re: [SR-Users] KEMI

2018-02-14 Thread Grant Bagdasarian
List Subject: Re: [SR-Users] KEMI I am more into Lua when it comes on doing something the native kamailio.cfg cannot do, that's because Lua has a decent range of extensions (external Lua libraries). JavaScript was added for those that do not need a lot of external extensions, but want to h

Re: [SR-Users] KEMI

2018-02-07 Thread Daniel-Constantin Mierla
I am more into Lua when it comes on doing something the native kamailio.cfg cannot do, that's because Lua has a decent range of extensions (external Lua libraries). JavaScript was added for those that do not need a lot of external extensions, but want to have script reload. Same for Squirrel, but

Re: [SR-Users] KEMI

2018-02-07 Thread Aleksandar Sosic
Thanks Dan for the extensive answer! My last question then is what kemi language do you use personally? :D Kind regards, -- Aleksandar Sosic mail: alex.so...@timenet.it skype: alex.sosic cell: +385 91 2505 146 On Tue, Feb 6, 2018 at 8:44 PM, Daniel-Constantin Mierla wrote: > The C code is the

Re: [SR-Users] KEMI

2018-02-06 Thread Daniel-Constantin Mierla
The C code is the same for 99% of the KSR functions available either in python or javascript (or the other kemi languages). Only KSR.pv and KSR.x functions are implemented in the app_python or app_jsdt modules. So if such a KSR function is broken, it is the same everywhere Probably KSR.pv can be m

Re: [SR-Users] KEMI

2018-02-06 Thread Aleksandar Sosic
What about JS? Anyone using JavaScript with KEMI? Is it a better choice than python? -- Aleksandar Sosic mail: alex.so...@timenet.it skype: alex.sosic cell: +385 91 2505 146 On Tue, Feb 6, 2018 at 11:06 AM, Daniel-Constantin Mierla wrote: > Hello, > > > since we are discussing about python here,

Re: [SR-Users] KEMI

2018-02-06 Thread Daniel-Constantin Mierla
Hello, since we are discussing about python here, just to let you know that among those Kemi modules, app_python is the only one that has no script reload support. I started to implement it, but it doesn't work, crashing. If someone is familiar with the module, maybe he can help testing/troublesh

Re: [SR-Users] KEMI

2018-02-05 Thread Samuel F .
Hi Aleksandar, We are pushing many thousands of calls each day through a few different KEMI Python deployments without any issues so far. I think Kemi with Python is a great choice. Kind regards, Samuel From: sr-users on behalf of Aleksandar Sosic Sent: Mond

Re: [SR-Users] kemi with lua and dispatcher - attempt to index field 'dispatcher' (a nil value)

2017-11-22 Thread Daniel-Constantin Mierla
Hello, On 22.11.17 16:45, Karsten Horsmann wrote: > Hello Daniel, > > yes after playing around under kamailio-5.0.x, i understand that kemi > exports are not complete. > > For example the KSR.hdr.append_hf dont work in kamailio-5.0.x > attempt to call field 'append_hf' (a nil value) > KSR.hdr.app

Re: [SR-Users] kemi with lua and dispatcher - attempt to index field 'dispatcher' (a nil value)

2017-11-22 Thread Karsten Horsmann
Hello Daniel, yes after playing around under kamailio-5.0.x, i understand that kemi exports are not complete. For example the KSR.hdr.append_hf dont work in kamailio-5.0.x attempt to call field 'append_hf' (a nil value) KSR.hdr.append_hf("P-Hint: outbound\r\n"); But i found KSR.hdr.append("P-Hint

Re: [SR-Users] kemi with lua and dispatcher - attempt to index field 'dispatcher' (a nil value)

2017-11-22 Thread Daniel-Constantin Mierla
Hello, On 22.11.17 12:42, Karsten Horsmann wrote: > Hello List, > > i dunno why this happen :) after i write an email to the list - but > now i found it. > > the app_lua/kemi function name is sr.dispatcher.select for ds_select_dst as wrote on my previous response to your initial email in this di

Re: [SR-Users] kemi with lua and dispatcher - attempt to index field 'dispatcher' (a nil value)

2017-11-22 Thread Daniel-Constantin Mierla
Hello, version 5.0 doesn't have a lot of the functions from kamailio modules exported to kemi (KSR module). Not even v5.1 will have all of them, but I expect to be over 80% in v5.1. There is a generic kemi function that can be used to execute any (most of) functions from modules KSR.x.modf(...):

Re: [SR-Users] kemi with lua and dispatcher - attempt to index field 'dispatcher' (a nil value)

2017-11-22 Thread Karsten Horsmann
Hello List, i dunno why this happen :) after i write an email to the list - but now i found it. the app_lua/kemi function name is sr.dispatcher.select for ds_select_dst The source-code documentation guides me to this point after greping around in app_lua. # dst_select( "GROUP", "HASH METHOD

Re: [SR-Users] kemi lua routing block as route in standart cfg

2017-08-02 Thread Daniel-Constantin Mierla
Hello, if you want to do routing in lua via kemi, the kamailio.cfg has only the passive part (global parameters, loading modules and modparams) and the active part (routing blocks) is a separate file written in the desired scripting language (e.g., lua). See examples: - https://github.com/kamai

Re: [SR-Users] kemi lua routing block as route in standart cfg

2017-08-02 Thread Yuriy Gorlichenko
Hi, no I wanna include lua routes part at existing kamailio.cfg file Just wanna rewrite some route with lua code using kemi because lua more flexible for my needs, but want to call this route at the cfg file. like kamailio.cfg ... route { [MY_SUPER_ROUTE_IN_LUA] } ... Where MY_SUPER_ROUTE_IN_LU

Re: [SR-Users] kemi lua routing block as route in standart cfg

2017-08-02 Thread Daniel-Constantin Mierla
Hello, On 02.08.17 12:02, Yuriy Gorlichenko wrote: > Hello. I found how to implement lua routimg logic with > cfgengine but didn't found how to include cimple route in lua at the > cfg file > > Presume i have routing logic and want to include > my_super_custom_route written with Kemo on lua. Ho

Re: [SR-Users] KEMI, Lua external modules and nonblicking operations

2017-05-09 Thread Daniel-Constantin Mierla
Hello, a blocking operation in configuration file or kemi script is blocking the sip worker. If your http operation is not blocking, then it is not going to block the sip worker in kamailio. If you want to keep the sip request until the http response arrive, suspend the transaction, do the http qu

Re: [SR-Users] KEMI Python and msg.call_function()

2017-05-05 Thread Daniel-Constantin Mierla
As a quick hacking session this morning, based on your interest, I just exported the t_load_contacts()/t_next_contacts() to KEMI interface, so if you use latest master, then you can use them dirrection without the call_function() wrapper. Cheers, Daniel On 05.05.17 08:27, Daniel-Constantin Mier

Re: [SR-Users] KEMI Python and msg.call_function()

2017-05-04 Thread Daniel-Constantin Mierla
Hello, these messages are printed by debugger module because you enabled cfgtrace and the log level for them is ERROR. But they are not real execution errors. If you set cfgtrace to 0 for debugger module, then you will not see them. Cheers, Daniel On 04.05.17 21:29, Samuel F. wrote: > > Hi, >