I have a trivial doubt about SIP. I tried searching on the Internet and referenced many books, but still I cannot find a good reason to add the tag to the SIP request.
SIP Request Example (snapshot from rfc-3261)
INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds Max-Forwards: 70 To: Bob <sip:bob@biloxi.com> From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710@pc33.atlanta.com CSeq: 314159 INVITE Contact: <sip:alice@pc33.atlanta.com> Content-Type: application//sdp Content-Length: 142
According to rfc-3261:
A dialog can be identified using tags, tags, and call IDs.
I know the exact reason for adding to-tag and call-id. What I do not know,
[EDIT] "tag" From, : http://andrewjprokop.wordpress.com/2013/09/23/lets-play-sip-tag/
.
, :
Call-ID . , SIP . , , , , - , . Call-ID , , . ., . - Call-ID, , . , , . ( ), UAC. (To tag), UAS (User Agent Server). UAC From, UAS To. , UAC, From To . UAS SIP (, 180 ), . , . , SIP- From, , , .
Call-ID . , SIP . , , , , - , . Call-ID , , . .
, . - Call-ID, , . , , . ( ), UAC. (To tag), UAS (User Agent Server). UAC From, UAS To. , UAC, From To . UAS SIP (, 180 ), . , . , SIP- From, , , .
@Ani, , , "From-tag" . , / , To From, From To-Tag.
:
, A INVITE B, From A ( ), To Header B ( ). , , B A, , From Header B sip uri B, TO A sip uri A. B , A .
, , From-tag INVITE, To-Tag Re-INVITE , .
- UAC , Call-Id. .
/ - , FROM, Dialog.
INVITE PSTN, IAM SAM INVITE FROM. . RFC 3578 . , FROM GW , INVITE, .
"" .
PDF http://www.sipknowledge.com/rfc3261_explained_light.zip
8.1.1.3 ""
, 8.3.1 , From , SIP.
, . , CALL-ID . & SIP. , SIP-.
3: ( )
https://www.ietf.org/rfc/rfc2543.txt
RFC3911- "" (SIP) https://www.rfc-editor.org/rfc/rfc3911.txt
: -
11.5
When the request was subsequently received, the following checks were made:
1. If the Call-ID is new, the request is for a new call, regardless of the values of the To and From header fields. 2. If the Call-ID exists, the request is for an existing call. If the To, From, Call-ID, and CSeq values exactly match (including tags) those of any requests received previously, the request is a retransmission. 3. If there was no match to the previous step, the To and From fields are compared against existing call leg local and remote addresses. If there is a match, and the CSeq in the request is higher than the last CSeq received on that leg, the request is a new transaction for an existing call leg.