Hello. > Hi Anton, > > So the reload is done at script level (from DB -> memcache) > > Do make the reload triggering independent of SIP traffic, use a > timer_route, so each 2 sec (for example) you can check the shvar and do > the reload.
I've tried to do like this: route[check_parameters] { xlog("*** +++ route[check_parameters]"); } timer_route[check_parameters, 3] { xlog("*** +++ timer_route[check_parameters, 3]"); } But this doesn't work - route[check_parameters] didn't called. Why? > > Regards, > Bogdan > > Anton Zagorskiy wrote: > > Hello. > > I'm loading them in the startup_route and store them using > cache_store. > > > > Now I'm using the following scheme: > > 1. I defined a variable in the cfgutils module using > modparam("cfgutils", > > "shvset", "blah") > > 2. In the main route block I check does blah's value equal 2 (for > example). > > If it is, I reload data from DB. > > 3. When I need to reload data I use a command 'opensipsctl fifo > shv_set blah > > int 2'. > > > > The main inconvenience is that I need to call (or to send any valid > SIP > > request) to someone to reload data. > > > > > > > >> Hi Anton, > >> > >> how do you load these params at startup and where do you store them > >> (what kind of variables)? > >> > >> Regards, > >> Bogdan > >> > >> Anton Zagorskiy wrote: > >> > >>> Hello. > >>> > >>> I have some parameters that are stored in a DB. I'm loading it once > >>> > >> time > >> > >>> when opensips starts. > >>> After when they are changed in the DB I want to re-read it. How can > I > >>> > >> do > >> > >>> this without restarting opensips? > >>> > >>> > >>> > >>> > > > -- > Bogdan-Andrei Iancu > OpenSIPS Bootcamp > www.voice-system.ro > > > _______________________________________________ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users