Why are Tags required to identify a SIP dialog?
Asked Answered
O

3

9

A combination of local and remote tags along with Call-ID is used to identify a dialog. It is said that Call-ID is a unique value for a call. Why then is Call-ID not used solely to identify the dialog?

Oxygen answered 19/9, 2011 at 13:2 Comment(0)
C
14

In a word: "hairpinning".

"Hairpinning" is when a user agent makes a call to itself, mainly for the purposes of self-testing. (The other reason you might have this is because your proxy routes your call to yourself, called "tromboning". When done intentionally, it's a useful end-to-end test of your infrastructure.)

So let's say you send an INVITE to yourself, and answer it. Your user agent must then have two dialogs (each with identifiers), each representing one end of the call. If you only have a Call-ID, then you don't know which dialog is the caller and which the callee.

The From and To tags here are the way you can unambiguously determine which dialog is which.

Carrizales answered 19/9, 2011 at 14:47 Comment(2)
Thanks for the information. Was not aware of the concept of Hairpinning. Found 1 more scenario which indicates significance of tags in dialog id. Read somewhere that when an INVITE is forked by proxy then UAC will receive multiple response for the same request. This will create separate dialogs as part of same call, i.e. Call ID is same thus To and From Tags will be used to identify which dialog corresponds to which UAs. Kindly confirm if this understanding is correct?Oxygen
That is indeed correct, Pravi. See RFC 3261, section 13.1, 2nd last paragraph.Carrizales
D
2

From Tag and To tag are not sufficient to uniquely identify a SIP dialog between Alice and Bob. You must combine the Call-ID too.

In the RFC 3261 page 12, we find this :

Call-ID contains a globally unique identifier for this call, generated by the combination of a random string and the softphone's host name or IP address. The combination of the To tag, From tag, and Call-ID completely defines a peer-to-peer SIP relationship between Alice and Bob and is referred to as a dialog.

SIP RFC 3261

Damiondamita answered 8/10, 2015 at 7:55 Comment(1)
The sentence you quoted is list in RFC 3261 page 13, not page 12.Revet
F
1

even though a unique call-ID guarantees uniqueness when message is send but in case of forking call-ID does not guarantees uniqueness. For example if alice call bob, Invite messages to be sent to all bob's registered endpoints — bob's smart phone and bob's PC. That's where tag comes into picture to identify the response comes from which endpoint. Each endpoint will send the response with same call-ID but different tags.

Featherstitch answered 9/5, 2018 at 18:54 Comment(1)
Isn't that the purpose of the branch ID?Iamb

© 2022 - 2024 — McMap. All rights reserved.