Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are Tags required to identify a SIP dialog?

Tags:

sip

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?

like image 801
Pravi Avatar asked Sep 19 '11 13:09

Pravi


People also ask

Why tag is used in SIP?

The goal of a tag is to work with the Call-ID to make an entire dialog unique no matter how many times a session might be forked.

What is a dialog identifier I SIP?

A dialog is established by SIP messages, such as a 2xx response to an INVITE request. A dialog is identified by a call identifier, local tag, and a remote tag. A dialog was formerly known as a call leg.” It's important to know that a dialog isn't necessarily associated with a media session.

What is inside dialog in SIP?

A dialog represents a persistent peer-to-peer relationship between two user agents. A dialog facilitates the sequencing of messages between the user agents and the proper routing of requests between the user agents. The dialog represents a context in which to interpret SIP messages.

What is transaction and dialog in SIP?

A dialog is a complete exchange of SIP messages between two user-agents. That means that transactions are actually parts of a dialog. For example, in the case of a SIP session establishment, a dialog starts with the INVITE-200 OK transaction, continues with the ACK and ends with the BYE-200 OK transaction.


3 Answers

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.

like image 71
Frank Shearar Avatar answered Sep 29 '22 13:09

Frank Shearar


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.

like image 36
amit pandey Avatar answered Sep 29 '22 14:09

amit pandey


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

like image 26
Cyrill Gremaud Avatar answered Sep 29 '22 13:09

Cyrill Gremaud