开发者

Why are Tags required to identify a SIP dialog?

A combinatio开发者_如何学编程n 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?


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜