[SIPForum-discussion] Request/response question...

barcaroller at sympatico.ca barcaroller at sympatico.ca
Tue Jun 10 21:46:03 UTC 2008


I have a basic SIP question.  The way I understood RFC3261, the "To:" header 
field in a response  has to match the "To:" header field of the 
corresponding request (if no To tag is present in the request).  This is 
true for 99% of the SIP conversations I've seen but not for the (real-life) 
example below (note that the "To:" header fields differ).  Wireshark has no 
problem with analyzing this SIP conversation, so I suspect I'm 
misinterpreting the RFC.

Does anyone know why/how the "To:" header field is different in the 
response?


#
# The request
#
INVITE sip:5557451576 at e.voncp.com:10000 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.156:10000;branch=z9hG4bK-762646f2
From: 555-482-0690 
<sip:15554820690 at e.voncp.com:10000>;tag=716ff48d4ef52332o0
To: <sip:5557451576 at e.voncp.com:10000>
Remote-Party-ID: 555-482-0690 
<sip:15554820690 at e.voncp.com:10000>;screen=yes;party=calling
Call-ID: 81f537e9-aaa35786 at 192.168.5.156
CSeq: 102 INVITE
Max-Forwards: 70
Proxy-Authorization: Digest 
username="15554820690",realm="69.59.242.85",nonce="1489356920",uri="sip:5557451576 at e.voncp.com:10000",algorithm=MD5,response="095bb689741268d970ca807964d58a73"
Contact: 555-482-0690 <sip:15554820690 at 192.168.5.156:10000>
Expires: 240
User-Agent: 001310757539 Linksys/RT31P2-3.1.6(LI)
Content-Length: 316


#
# The response
#
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.5.156:10000;branch=z9hG4bK-762646f2
From: 555-482-0690 
<sip:15554820690 at e.voncp.com:10000>;tag=716ff48d4ef52332o0;natted=24.235.117.242
To: <sip:0vonCallee-2351073 at e.voncp.com:10000>;tag=1645248237
Call-ID: 81f537e9-aaa35786 at 192.168.5.156
CSeq: 102 INVITE
Contact: <sip:0vonCallee-2351094 at 69.59.242.85:10000>
Max-Forwards: 15



#
# The relevant RFC section
#

8.2.6.2 Headers and Tags


   The From field of the response MUST equal the From header field of
   the request.  The Call-ID header field of the response MUST equal the
   Call-ID header field of the request.  The CSeq header field of the
   response MUST equal the CSeq field of the request.  The Via header
   field values in the response MUST equal the Via header field values
   in the request and MUST maintain the same ordering.

   If a request contained a To tag in the request, the To header field
   in the response MUST equal that of the request.  However, if the To
   header field in the request did not contain a tag, the URI in the To
   header field in the response MUST equal the URI in the To header
   field; additionally, the UAS MUST add a tag to the To header field in
   the response (with the exception of the 100 (Trying) response, in
   which a tag MAY be present).  This serves to identify the UAS that is
   responding, possibly resulting in a component of a dialog ID.  The
   same tag MUST be used for all responses to that request, both final
   and provisional (again excepting the 100 (Trying)).  Procedures for
   the generation of tags are defined in Section 19.3.





More information about the discussion mailing list