30 mar 2013 kl. 21:33 skrev "Peter Dunkley" <[email protected]>:
> Done. I think. > > I don't have a system here to test WebSockets at the moment, but the > changes looked pretty straight-forward and it all compiles OK :-) > > Can you take a look and tell me if it is what you were thinking? If > anyone has any problems with it I'll roll back the changes. On first look the commit looks exactly like I was thinking. I was just playing with the outbound module to implement a read-only "outbound_enabled" to figure out how to do this. I found the /doc/cfg.txt file very useful in order to understand this framework. > > There are two configuration variables, one for keepalive_timeout and one > for enabled. This means the keepalive_timeout can be changed live and the > WebSocket enabled/disabled state (previously just settable through MI > commands) can be changed using the cfg framework. > > The keepalive_interval that you suggested is used during module init to > set how often the extra processes for sending keep-alives runs. I can't > see how to change this once Kamailio has started. Makes sense. /O > > Regards, > > Peter > >> >> 30 mar 2013 kl. 18:32 skrev "Olle E. Johansson" <[email protected]>: >> >>>>> 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 > > > -- > Peter Dunkley > Technical Director > Crocodile RCS Ltd _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
