Hi Jeng,<br><br>From the Asterisk CLI type "stop gracefully" and it will do exactly what you described (stop accepting calls and shut down when all calls have completed). If you don't want to stop accepting calls, but still want to stop Asterisk when there are no active calls, you can use "stop when convenient". The same qualifiers ("gracefully" and "when convenient") can be applied to the "restart" command.
<br><br>Cheers,<br>AR<br><br><div class="gmail_quote">On Dec 10, 2007 7:29 AM, Jeng Yu <<a href="mailto:jengyu2007@yahoo.co.uk">jengyu2007@yahoo.co.uk</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
My Gurus!<br><br>I'm still playing with asterisk in the lab here. There<br>is a feature that I need in a production asterisk<br>system. I was wondering if it already exists in<br>asterisk.<br><br>When we want to shutdown a production asterisk system,
<br>we would like the shutdown to happen after there are<br>no<br>more calls being processed. In other words, a shutdown<br>command that does the following:<br><br> - block asterisk from receiving/answering all new<br> connection requests
<br><br> - monitor existing call connections it is currently<br> handling<br><br> - when all calls/connections have ended, then<br>effect<br> the shutdown and stop the asterisk process.<br><br>Is there a way to do this in asterisk now, and how?
<br><br>This would be the ultimate graceful shutdown; perfect<br>for routine system maintenance tasks on production<br>servers handling continuous traffic.<br><br>Thanks,<br><br>Jeng<br></blockquote></div>