Hello List,
i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constanti... and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts.
Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)?
Thanks in advance
Cheers Karsten
Hi Karsten,
already found this one?
https://kamailio.org/docs/modules/5.3.x/modules/app_lua.html#app_lua.p.reloa...
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Karsten Horsmann Sent: Tuesday, September 8, 2020 9:14 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] how to reload kemi scripts? kamailio 5.3.x or 5.4.x
Hello List,
i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constanti... and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts.
Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)?
Thanks in advance
Cheers Karsten
-- *Karsten Horsmann*
For python this is also available:
https://kamailio.org/docs/modules/5.3.x/modules/app_python.html#app_python.r...
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Henning Westerholt Sent: Tuesday, September 8, 2020 9:19 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Karsten Horsmann khorsmann@gmail.com Subject: RE: [SR-Users] how to reload kemi scripts? kamailio 5.3.x or 5.4.x
Hi Karsten,
already found this one?
https://kamailio.org/docs/modules/5.3.x/modules/app_lua.html#app_lua.p.reloa...
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of Karsten Horsmann Sent: Tuesday, September 8, 2020 9:14 AM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Subject: [SR-Users] how to reload kemi scripts? kamailio 5.3.x or 5.4.x
Hello List,
i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constanti... and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts.
Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)?
Thanks in advance
Cheers Karsten
-- *Karsten Horsmann*
Hello,
Henning pointed in the other response that an RPC command has to be executed for reload, giving the link to the one for app_lua module.
I am jumping in here to say that Python2/3 module have now reload capabilities as well, what I presented in 2018 is no longer valid for those modules. If you see the app_puthon.reload in the list of exported rpc commands, then that version has reload support.
Regarding the possibility of "drop in a new file and that's it", I explicitly didn't want this mode of operations for a few reasons:
* requires to check the last update timestamp for each sip packet routed with the script * I typically do intermediary saves when updating the files, and this can lead to reloading a version before everything is finished. Of course, one can edit in other place and the push it to config folder, but somehow I didn't like the approach.
If someone wants something like this, it has to do it with a modparam option.
Cheers, Daniel
On 08.09.20 09:14, Karsten Horsmann wrote:
Hello List,
i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constanti... and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts.
Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)?
Thanks in advance
Cheers Karsten
-- *Karsten Horsmann*
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello Daniel and Henning,
I am fine with the rpc reload command. I try to understand how the mechanism works.
That python 2/3 rpc reloading also works (since which version?) is very nice.
I assume to find a hint for "reload your scripts with the rpc reload command for your kemi-scripting language, description are in the module docu" or something like that in the KEMI documentation.
Thanks for the quick response.
Cheers Karsten
Am Di., 8. Sept. 2020 um 09:27 Uhr schrieb Daniel-Constantin Mierla < miconda@gmail.com>:
Hello,
Henning pointed in the other response that an RPC command has to be executed for reload, giving the link to the one for app_lua module.
I am jumping in here to say that Python2/3 module have now reload capabilities as well, what I presented in 2018 is no longer valid for those modules. If you see the app_puthon.reload in the list of exported rpc commands, then that version has reload support.
Regarding the possibility of "drop in a new file and that's it", I explicitly didn't want this mode of operations for a few reasons:
- requires to check the last update timestamp for each sip packet routed
with the script
- I typically do intermediary saves when updating the files, and this
can lead to reloading a version before everything is finished. Of course, one can edit in other place and the push it to config folder, but somehow I didn't like the approach.
If someone wants something like this, it has to do it with a modparam option.
Cheers, Daniel On 08.09.20 09:14, Karsten Horsmann wrote:
Hello List,
i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constanti... and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts.
Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)?
Thanks in advance
Cheers Karsten
-- *Karsten Horsmann*
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Hello,
On 08.09.20 10:23, Karsten Horsmann wrote:
Hello Daniel and Henning,
I am fine with the rpc reload command. I try to understand how the mechanism works.
That python 2/3 rpc reloading also works (since which version?) is very nice.
Since the version that lists the rpc command in the readme of the module.
I assume to find a hint for "reload your scripts with the rpc reload command for your kemi-scripting language, description are in the module docu" or something like that in the KEMI documentation.
You are more than welcome to contribute such addition to the docs -- make a pull request for the file where you went to find such hint and you didn't find it. The developer does necessary have the same work flow matching users expectation, but such cases help us improve for the future.
Thanks for the quick response.
Cheers Karsten
Am Di., 8. Sept. 2020 um 09:27 Uhr schrieb Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Hello, Henning pointed in the other response that an RPC command has to be executed for reload, giving the link to the one for app_lua module. I am jumping in here to say that Python2/3 module have now reload capabilities as well, what I presented in 2018 is no longer valid for those modules. If you see the app_puthon.reload in the list of exported rpc commands, then that version has reload support. Regarding the possibility of "drop in a new file and that's it", I explicitly didn't want this mode of operations for a few reasons: * requires to check the last update timestamp for each sip packet routed with the script * I typically do intermediary saves when updating the files, and this can lead to reloading a version before everything is finished. Of course, one can edit in other place and the push it to config folder, but somehow I didn't like the approach. If someone wants something like this, it has to do it with a modparam option. Cheers, Daniel On 08.09.20 09:14, Karsten Horsmann wrote:
Hello List, i read Daniels Presentation https://www.kamailio.org/events/2018-KamailioWorld/Day0/W07-Daniel-Constantin.Mierla-KEMI-Scripting.pdf and there is an hint about python(2/3) - that kemi script reloading is not supported with python kemi scripts. Is that correct for the actual versions (5.3.x and 5.4.x)? And if i use for example lua as kemi script language, how i restart that script only? Drop in a new file and thats it (like FreeSWITCH did that)? Thanks in advance Cheers Karsten -- *Karsten Horsmann* _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla
-- Mit freundlichen Grüßen *Karsten Horsmann*