[asterisk-dev] [Code Review] SIP: incorrect usage of 503 message

David Vossel dvossel at digium.com
Mon Aug 24 18:59:51 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/342/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

I was about to commit this change, but felt a little uneasy about its implications.  Here's the problem.

A 503 message tells a client it should try and forward the request to an alternate server and should not forward any other requests to the initial server for a certain time-out period.  When Asterisk receives a 503 message it passes that as a AST_CONTROL_CONGESTION frame.  If the other side is SIP, the AST_CONTROL_CONGESTION frame is converted back to a 503 message and sent to the client.  The client may then attempt to fall back to an alternate server when nothing was wrong with asterisk to begin with... Asterisk was essentially just forwarding the 503.

This patch simply translates AST_CONTROL_CONGESTION into a 500 error rather than a 503.  In most cases I believe this is correct, but I don't fully understand the implications of such a change.  AST_CONTROL_CONGESTION is used for many things.  Could this change actually adversely affect failover in any way?

I also changed a few explicit 503 errors to 500 errors where I felt a 500 was more appropriate.


Diffs
-----

  /trunk/channels/chan_sip.c 213716 

Diff: https://reviewboard.asterisk.org/r/342/diff


Testing
-------


Thanks,

David




More information about the asterisk-dev mailing list