[asterisk-dev] Shut down gracefully & Channel responses

Olle E. Johansson oej at edvina.net
Mon Jun 14 11:05:26 CDT 2010


Hi!

I tried to find out what happens in channels during the "graceful" period when the PBX is not accepting calls. For OPTIONS, we have a call to ast_shutting_down and respond 503 during this period to activate failover.

We do not check that before we start a new pbx on an incoming INVITE though. I think that would be a good thing to do. I fail to trace this through the main/*.c files. Somewhere the PBX gotta refuse calls (it's documented) but I can't find where and which response code ast_pbx_start is giving to the channel. 

I think we can solve this in two ways:

- Fix this response so that the channel doesn't get AST_PBX_FAILED, which I suspect today, but something else. We can implement this as AST_PBX_FAILED in channels until channel developers know what to do and if they want to support AST_PBX_SHUTDOWN.
- Make channels call ast_shutting_down before starting a PBX and handle it locally.

What do you think?

/O




More information about the asterisk-dev mailing list