Subject: [Stox] 503 / <service-unavailable/>

From: Peter Saint-Andre <[email-masked]>
Date: Tue, 30 Jul 2013 14:24:19 +0200

Robert Sparks pointed out to me in person today that the usage of SIP
error 503 is broken in stox-core.

RFC 3261 says:

21.5.4 503 Service Unavailable

   The server is temporarily unable to process the request due to a
   temporary overloading or maintenance of the server.  The server MAY
   indicate when the client should retry the request in a Retry-After
   header field.  If no Retry-After is given, the client MUST act as if
   it had received a 500 (Server Internal Error) response.

   A client (proxy or UAC) receiving a 503 (Service Unavailable) SHOULD
   attempt to forward the request to an alternate server.  It SHOULD NOT
   forward any other requests to that server for the duration specified
   in the Retry-After header field, if present.

   Servers MAY refuse the connection or drop the request instead of
   responding with 503 (Service Unavailable).

Thus the applicability of 503 in SIP is quite different from that of
<service-unavailable/> in XMPP. In XMPP, a client (or, more often, a
server on its behalf) can return <service-unavailable/> to mean
"sorry, I can't provide the service you've requested for the user@host
you've tried to contact, but that applies only to that user@host". If
the XMPP-to-SIP gateway returns <service-unavailable/> for a single
account in that way, the SIP-to-XMPP gateway on the other side won't
be able to send *anything* to the peer domain. This breaks all
server-to-server communication. Thus Robert suggested that we take a
very close look at our mapping into SIP 503, and very probably never
use it (or only in very rare cases). I haven't had time yet to look at
this in detail, but I will do so before the STOX session on Thursday.

Peter

- -- 
Peter Saint-Andre
https://stpeter.im/