[SR-Users] How to set variable externally

Olle E. Johansson oej at edvina.net
Fri Dec 21 17:15:18 CET 2012


21 dec 2012 kl. 17:10 skrev Ovidiu Sas <osas at voipembedded.com>:

> If you just want to control the debug level externally, take a look at
> the debug parameter:
> http://www.kamailio.org/wiki/cookbooks/3.3.x/core#debug
> It can be controlled via sercmd (kamcmd in future versions).
> 
> If you want to play with global flags, take a look at cfgutils:
> http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html
> http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2533439
> http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2494518
> http://kamailio.org/docs/modules/3.3.x/modules_k/cfgutils.html#id2494559


For your own logs:

I usually declare a shared variable called "debug" in the pv module modparams.

When logging i do 

if ($shv(debug) > 0)
   xlog(....)

All shared variables, like Daniel said, can be changed with kamctl/sercmd.

/O


More information about the sr-users mailing list