Hi Robert,
o Robert Szokovacs on 02/01/2011 05:09 PM:
On 2011 January 13, Thursday 15:21:11 Stefan Sayer wrote:
If you have any contributions to share, or are aware of any issues in
1.4-dev version, now it may be a good time to have them included in
the 1.4 release.
Hi,
Attached is a patch that adds the "graceful shutdown" functionality to SEMS:
Using the Stats interface, one can switch on and off the shutdown mode. In
shutdown mode, SEMS will reject the incoming INVITEs with a configurable error
code/error message, also it will reply with the same message to the OPTIONS
requests. There is also a "session kill" mode, it flips a boolean flag to true
which the applications can check and act accordingly (send BYE to the peers,
play a goodbye message or do whatever needed to gracefully shut down the
sessions). These two conditions are reversible and semi-dependent on
eachother: turning on session kill implies turning on shutdown mode, turning
off shutdown mode implies turning off session kill.
the shutdown mode is useful I think - I have added it to master. I
have changed the name of the config parameter to shutdown_mode_reply,
like this: shutdown_mode_reply="503 Oh Noes", and added it also to
xmlrpc2di.
The session shutdown, though, does not make much sense:
- sessions should be notified (thread woken up) when shutdown is
requested, and not only act the next time they process anything
- there is already the possibility to send SIGHUP, see
doc/src/doc_signals.h or the doxygen doc:
SIGHUP - broadcast shutdown, usually sends BYE and stops all
calls. The server does not terminate.
- you can also broadcast SIGUSR1 and SIGUSR2 and act accordingly in
your sessions
- if you want to have an in-mem DB that is accessed thread-safe from
in and outside SEMS, load monitoring; you can access it via DI (stats,
xmlrpc, json-rpc) and there is macros to easily get that info; see
Readme.monitoring
- if you want to pass more information to the sessions, use monitoring
to get the session IDs, and send events e.g. in DSM by calling
postEvent DI function from DSM
Thanks!
BR
Stefan
P.S: it would be nice to have documentation along with new features -
I also have the 1.3.1 version of my "detailed statistics" patch I sent on 8th
of March 2010, if you need it I can send it again.
br
Szo
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev