[asterisk-dev] [Code Review] SIP: for an INVITE transaction, treat all 2XX responses the same as a 200

Simon Perreault simon.perreault at viagenie.ca
Thu Sep 23 07:07:43 CDT 2010


On 2010-09-23 06:53, Olle E. Johansson wrote:
> For an INVITE, I have never seen any other response. As Stefan says, for REFERs we already handle the valid alternative.
> What case are you considering here, David?
> A 202 Accept to an INVITE is not a 200 OK, really.

RFC 3261 says:

8.1.3.2 Unrecognized Responses

   A UAC MUST treat any final response it does not recognize as being
   equivalent to the x00 response code of that class, and MUST be able
   to process the x00 response code for all classes.  For example, if a
   UAC receives an unrecognized response code of 431, it can safely
   assume that there was something wrong with its request and treat the
   response as if it had received a 400 (Bad Request) response code.  A
   UAC MUST treat any provisional response different than 100 that it
   does not recognize as 183 (Session Progress).  A UAC MUST be able to
   process 100 and 183 responses.

Assuming Asterisk knows about codes 200 and 202, it can process 202
differently than 200 for an INVITE request. But if it receives anything
else in 2xx, then it must treat that as 200.

Simon
-- 
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server        --> http://numb.viagenie.ca
vCard 4.0               --> http://www.vcarddav.org



More information about the asterisk-dev mailing list