[OpenSIPS-Users] any reason why Opensips would replace 503 with 500 ?

Taisto Qvist taisto.qvist at ip-solutions.se
Fri Oct 8 08:39:36 CEST 2010


  Hi,

Just to explain in detail, since I'm a bit puzzled at an application
needing this...NOT doing so creates the potential for breaking a lot
more.

The 503 response is used to indicate to the received that

"I am completely broken, please dont send *anything* to me for a while."

A proxy that forwards a 503 response straight through, is "telling"
the previous hop that it should not be used for any request whatsoever,
usually causing that previous hop to blacklist the entire proxy
for a undefined duration, or according to time specified in the
Retry-After header.
In otherwords, the entire proxy becomes dead for all requests from
the previous hop which received the 503. Is that acceptable?

Any application based on proxies relaying 503 responses *unmodified*,
is basing their application logic on something that goes against
the defined behavior of rfc3261 and seems quite unusual, if not dangerous.

That said, if you really, really need it and capable of building
opensips yourself (which I need and do during my sip troubleshooting
course) it takes 3 seconds to fix by simply opening msg_translator.c
and modifying the line:

if ( msg->first_line.u.reply.statuscode==503 )

to

if ( 0 && msg->first_line.u.reply.statuscode==503 )

and recompiling.

The latest versions even has a "int disable_503_translation = 0;"
at the beginning of msg_translator.c, making it even easier to
disable, although I am very puzzled why you would need this in real
life. I am interested to hear though!

I have checked/seen whether it can be disabled in configuration.

Regards
Taisto Qvist
IP-Solutions.se




thrillerbee skrev 2010-10-07 23:44:
> Bogdan,
>
> Is this or could this be configurable?  It, unfortunately, breaks a lot of existing 
> applications.
>
> Thanks.
>
> On Thu, Oct 7, 2010 at 1:15 PM, Bogdan-Andrei Iancu <bogdan at voice-system.ro 
> <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Julien,
>
>     see:
>     http://lists.opensips.org/pipermail/users/2010-September/014505.html
>
>     Regards,
>     Bogdan
>
>     Julien Chavanton wrote:
>     > Hi, is there any reason why Opensips would replace 503 with 500 ?
>     >
>     > The UA initiating the call expect 503 to reroute somewhere else
>     >
>     > INVITE :
>     >
>     >  10.0.20.14(UA) -> 10.2.0.1(Proxy) -> 10.0.4.202(UA)
>     >
>     > RESPONSE :
>     >
>     > U 10.0.4.202:5060 <http://10.0.4.202:5060> -> 10.2.0.1:5060
>     <http://10.2.0.1:5060>
>     > SIP/2.0 503 Service Unavailable.
>     >
>     > U 10.2.0.1:5060 <http://10.2.0.1:5060> -> 10.0.20.14:53584
>     <http://10.0.20.14:53584>
>     > SIP/2.0 500 Service Unavailable.
>     >
>     > ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     --
>     Bogdan-Andrei Iancu
>     OpenSIPS Bootcamp
>     15 - 19 November 2010, Edison, New Jersey, USA
>     www.voice-system.ro <http://www.voice-system.ro>
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101008/719f3c28/attachment.htm 


More information about the Users mailing list