Ok, thanks Carlos !!
On Thu, May 29, 2014 at 7:00 PM, Carlos Ruiz Díaz <carlos.ruizd...@gmail.com > wrote: > Hi Rahul, > > currently, there's no way of updating those values on-the-fly. That > information is stored in memory and after a restart everything gets lost, > so you have to make sure no calls are active before doing the restart. This > is only true for cnxcc, and not for dialog module for example, which has > the option of backing everything up to a permanent storage such a database. > > Regards, > > > On Tue, May 27, 2014 at 4:39 AM, Rahul MathuR <rahul.ultim...@gmail.com> > wrote: > >> Hello Daniel, >> >> Thanks for replying. >> >> My query is purely from the perspective of updating few parameters (my >> apologies for using words which gave you an impression that I want to >> change the logic). >> The parameters I'm focussing on are: >> >> a) $var(max_chan) >> >> b) $var(client) >> >> as used under CNXCC module's channel limitation. >> >> >> >> So if I want to update the value of max_chan from (lets say) 50 to 100 >> and client from "bob" to "joe". How to reload these new values ? >> >> >> >> >> >> >> On Tue, May 27, 2014 at 9:30 AM, Daniel-Constantin Mierla < >> mico...@gmail.com> wrote: >> >>> Hello, >>> >>> the config logic cannot be reloaded. There are options to change various >>> parameters at runtime without restart. >>> >>> The logic can be reloaded if it is written in Lua (or, I guess, in some >>> other embedded scripting language). >>> >>> On the other hand, restarting kamailio doesn't affect ongoing calls at >>> all, and extremely rarely affects initiated transactions, they typically >>> recover due to retransmissions. >>> >>> Cheers, >>> Daniel >>> >>> >>> On 27/05/14 09:48, Rahul MathuR wrote: >>> >>> Hello, >>> >>> Is it possible to reload kamailio.cfg at the runtime after doing few >>> modifications on the business rules laid under CNXCC module. >>> >>> Eg: >>> >>> #!ifdef CNXCC_CHANNEL >>> >>> xlog("L_INFO", "Setting up channel based credit control"); >>> >>> $var(max_chan) = 2; >>> >>> $var(retcode) = cnxcc_set_max_channels("$var(client)", "$var(max_chan)"); >>> >>> if ($var(retcode) == -1) { >>> >>> xlog("Error setting up credit control"); >>> >>> return; >>> >>> } >>> >>> $var(count) = -1; >>> >>> if (!cnxcc_get_channel_count("$var(client)", "$var(count)")) { >>> >>> xlog("Error getting customer's channel count"); >>> >>> } >>> >>> xlog("L_INFO", "CNXCC ROUTE: $var(client) has $var(count) call(s)"); >>> >>> if ($var(retcode) < -1) { >>> >>> xlog("Too many channels for customer"); >>> >>> sl_send_reply(403, "Forbidden"); >>> >>> if (!cnxcc_terminate_all("$var(client)")) { >>> >>> xlog("Error terminating customer's calls"); >>> >>> } >>> >>> exit; >>> >>> } >>> #!endif >>> ****************************************************** >>> >>> Now I want to change the value of max_chan on the fly. Does this step >>> neccassitates a restart of kamailio process as a whole ? If no, then could >>> somebody please guide me how to achieve this ? >>> >>> >>> Thanks ! >>> >>> >>> >>> >>> >>> -- >>> Warm Regds. >>> MathuRahul >>> >>> >>> _______________________________________________ >>> sr-dev mailing >>> listsr-...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev >>> >>> >>> -- >>> Daniel-Constantin Mierla - >>> http://www.asipto.comhttp://twitter.com/#!/miconda - >>> http://www.linkedin.com/in/miconda >>> >>> >>> _______________________________________________ >>> sr-dev mailing list >>> sr-dev@lists.sip-router.org >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev >>> >>> >> >> >> -- >> Warm Regds. >> MathuRahul >> >> _______________________________________________ >> sr-dev mailing list >> sr-dev@lists.sip-router.org >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev >> >> > > > -- > Carlos > http://caruizdiaz.com > http://ngvoice.com > +52 55 3048 3303 > > _______________________________________________ > sr-dev mailing list > sr-dev@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev > > -- Warm Regds. MathuRahul
_______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev