Hi,
what i do is the following (for 3.2):
I've added a parameter in my config:
system.shutdownmode = 0 desc "System shutdown mode"
and in the routing, just after the processing of subsequential requests (e.g. BYE's, Re-INVITE's, etc.), i've added the following to my config:
# Check for shutdown mode: if ($sel(cfg_get.system.shutdownmode) > 0) { send_reply("503", "Server shutting down"); exit; }
With this, i can set my proxy to not accepting any new calls while waiting for the active calls to terminate.
From the commandline i can now call "sercmd cfg.set system
shutdownmode 1" to turn my "shutdownmode" on.
Afterwards you could just check via the dialog modules, if any other calls are active and then shutdown your Kamailio (e.g. "sercmd mi get_statistics dialog:").
There is similar behaviour implemented in SEMS, which i thought was a good idea.
Carsten
2011/11/24 Uri Shacked ushacked@gmail.com:
hi,
i am trying to deploy a way to gracefuly stop kamailio. the goal is to stop new incoming calls, wait for all active calls to end (i guess dialog module is a must...) and then, shutting down kamailio.....
any ideas will be great.... _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users