[SR-Users] proper way for infinite loop in event_route for evrexec module

Kaufman bkaufman at bcmone.com
Tue Aug 16 15:26:55 CEST 2022


I'm not clear - are you saying that you feel evrexec is well suited for on demand reloading of your htable?  It would see poorly suited to on demand tasks that are not trigged by SIP message handling (and triggering actions via SIP messages seems like an obtuse way of initiating these actions).  It should be easier to trigger an external script from your shell (or via web api, etc) than via kamcmd/kamcli, isn't it?

Kaufman
Sr. VoIP Engineer - BCM One

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Patrick Karton
Sent: Tuesday, August 16, 2022 2:27 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] proper way for infinite loop in event_route for evrexec module

Hello lhor,

yes i will do some tests with cron to see if it suits well.

the scenario is we have kamailio connected to redis database.

redis store some configs for kamailio that we want to update (from redis to kamailio htable) let say every 5 hours.

but if some reason we need to update some new config values from redis to kamailio immediatly. i want a way to trigger that as soon as we need it.

and evrexec  suits well for that i think.
________________________________
De : Patrick Karton <patrickarton at hotmail.com<mailto:patrickarton at hotmail.com>>
Envoyé : mardi 16 août 2022 08:25
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Objet : RE: [SR-Users] proper way for infinite loop in event_route for evrexec module

Hello lhor,

yes i will do some tests with cron to see if it suits well.

the scenario is we have kamailio connected to redis database.

redis store some configs for kamailio that we want to update (from redis to kamailio htable) let say every 5 hours.

but if some reason we need to update some new config values from redis to kamailio. i want a way to trigger that as soon as we need it.

and evrexec  suits well for that i think.
________________________________
De : sr-users <sr-users-bounces at lists.kamailio.org<mailto:sr-users-bounces at lists.kamailio.org>> de la part de Ihor Olkhovskyi <igorolhovskiy at gmail.com<mailto:igorolhovskiy at gmail.com>>
Envoyé : mardi 16 août 2022 07:09
À : sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org> <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Objet : Re: [SR-Users] proper way for infinite loop in event_route for evrexec module


Patrick,



Maybe I'm a bit out of context, but could some external process like cron suits better for this kind of tasks than internal job?


Le 14/08/2022 à 16:37, Patrick Karton a écrit :
Hello i would like to use the evrexec module to execute background jobs over exec module mainly because i want to be able to  trigger that route manually via rpc from time to time.

in the documentation its is stated we should use tasks that run forever and except using while loop i dont see another way.

and i dont to want to disable max_while_loops. but if i disable it i will get error message like runaway while (1091, 9): more then 100 loops.

so is there another way to do it properly ?

Thanks.



__________________________________________________________

Kamailio - Users Mailing List - Non Commercial Discussions

  * sr-users at lists.kamailio.org<mailto: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<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=05%7C01%7Cbkaufman%40bcmone.com%7Cf2ecc3d9d54e4da16f3708da7f596445%7Cafc1818e7b6848568913201b9396c4fc%7C1%7C0%7C637962319158472423%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jPN3VZNS0E%2B6X6Hy0re%2BxxBMPvutsHhrpU%2BqT1YWM4Y%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220816/080cd953/attachment.htm>


More information about the sr-users mailing list