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 <ushac...@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 > > -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Mobile +49 179 2021244 Office +49 40 34927219 Fax +49 40 34927220 Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284 Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/ _______________________________________________ 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