0
votes

When Alice places a call to Bob, Bob sends a 180 ringing message to Alice. Then why does the from field contains the uri of Alice and to field contains the uri of Bob? I am referring to the RFC 3261.

F2 180 Ringing Bob -> Alice

SIP/2.0 180 Ringing

Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101

From: Alice ;tag=9fxced76sl

To: Bob ;tag=8321234356

Call-ID: [email protected]

CSeq: 1 INVITE

Contact:

Content-Length: 0

2
What exactly you want to do? stackoverflow.com/help/how-to-askAjay Pandya
I am trying to understand the format of this message. If Bob sends the 180 ringing message to Alice, shouldn't he be in the From field and Alice in the To field?Kavya Jain

2 Answers

1
votes

According to RFC 3261, From Header identifies the originator of the REQUEST. To Header indicates the recipient of the REQUEST. And so, there wont be any change in From and To headers while Response is received.

4
votes

The same RFC contains the answer

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.