30 mar 2013 kl. 18:32 skrev "Olle E. Johansson" <oej(a)edvina.net>et>:
Also, some of the modparam parameters could be exposed
as cfg params -
which would make it easier to change them at runtime with
sercmd, but also expose them in SNMPstats. I think keepalive_interval and
keepalive_timeout are candidates for this.
If you can point me at a clear example of where this done elsewhere I'll
be happy to add it.
Look at dispatcher - config.c and dispacher.c.
http://sip-router.org/docbook/sip-router/branch/master/cfg_list/cfg_var_lis…
That page also gives more examples. I don't see a callback when variables in the
config fw changes,
so you need to get them with cfg_get before using if I understand it right.
Looking at the _cfg_def structure there is a callback. I was wrong. This framework could
also
be used for read-only variables, like "SIP Outbound enabled",
"Websockets/SIP enabled", "Websockets/TLS/SIP enabled".
/O