[sr-dev] Websocket module: Suggestions
Olle E. Johansson
oej at edvina.net
Sat Mar 30 18:53:16 CET 2013
30 mar 2013 kl. 18:32 skrev "Olle E. Johansson" <oej at edvina.net>:
>>> 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_list.html#dispatcher.ping_reply_codes
>
> 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
More information about the sr-dev
mailing list