SlideShare a Scribd company logo
SIP- CallID, Cseq, Via-Branch,
FROM/To-TAG Role Play
- Usage Clarifications
Sridhar Kumar N
Transaction vs Dialog
Call-ID
 Call-ID is so called Call Identifier.
 Globally Unique Identifier. Cryptographically random identifiers(RFC 1750) is
adopted to avoid traditional pseudo-random number pitfalls. Using
cryptographically random identifiers provides some protection against session
hijacking and reduces the likelihood of unintentional Call-ID collisions.
 It MUST be the same for all requests and responses sent by either UA in a
dialog
 Call-IDs are case-sensitive and are simply compared byte-by-byte.
 A single multimedia conference can give rise to several calls with different
Call-IDs, for example, if a user invites a single individual several times to the
same (long-running) conference.
Examples:
Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@biloxi.com
i:f81d4fae-7dec-11d0-a765-00a0c91e6bf6@192.0.2.4
Reuse of Call-ID
Cseq - Command Sequence
 The CSeq header field serves as a way to identify and order transactions. It
consists of a sequence number and a method.
 CSeq or Command Sequence contains an integer and a method name. The CSeq
number is incremented for each new request within a dialog and is a traditional
sequence number.
 32-bit unsigned integer and MUST be less than 2**31. i.e within a single call, one
request a second for about 136 years before needing to wrap around. Also client
can choose from 1 or 31 most significant bits of a 32-bit second clock as an initial
sequence number
 Exception - ACK and CANCEL
 Example:
CSeq: 4711 INVITE
Via-Branch
 The Via header field value MUST contain a branch parameter. The branch parameter
value MUST be unique. The exceptions to this rule are CANCEL and ACK for non-2xx
responses.
 The branch ID inserted by an element compliant with this specification MUST always
begin with the characters "z9hG4bK". These 7 characters are used as a magic
cookie (7 is deemed sufficient to ensure that an older RFC 2543 implementation
would not pick such a value), so that servers receiving the request can determine
that the branch ID was constructed in the fashion described by this specification
(that is, globally unique).
 It now plays the role of a unique transaction identifier. This requirement was added
to identify that the branch was created in accordance with RFC 3261 and not the
older RFC 2543 which did not require global uniqueness.
 It’s Case Insensitive
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
Via-Branch & Cseq –Response Matching
 A response matches a client transaction under two conditions:
From-TAG
 In the old SIP RFC, RFC 2543, the from-tag was optional and in RFC 3261, from-tag is
mandatory.
 Call-ID is not necessarily unique for all new requests from the same UAC. It can be reused when,
for example, retrying an INVITE with credentials after receiving a 401 Unauthorized response.
From RFC 3261 §8.1.1.4:
Note that when requests are retried after certain failure responses ,these retried requests are
not considered new requests, and therefore do not need new Call-ID header fields;
 Also For SIP Dialogue, It makes things symmetrical. It's easier to think about the dialog ID when
your dialog always has a local-tag and remote-tag, whether you were the initiator of the dialog or
not. And It's also easier to distinguish between initial and subsequent requests in a dialog, i.e. if
no to-tag then it must be an initial request
 Also It’s Serves purpose for “The Join header is used to logically join an existing SIP dialog with a
new SIP dialog SIP dialog (using call-id, to-tag, and from-tag)
i.e Actually we don’t have clarity that why FROM-TAG is mandatory. But RFC made mandatory. Hence
all are following. May be in future, we can see the fruits. But currently It’s purpose is joining with
Call- ID and TO-tag forms Dialogue Identity.
TO-Tag
 It’s a must add TAG parameter in response message by UAS.
 The "tag" parameter serves as a general mechanism to distinguish multiple instances
of a user identified by a single SIP URL. As proxies can fork requests, the same
request can reach multiple instances of a user (mobile and home phones, for
example). As each can respond, there needs to be a means to distinguish the
responses from each at the caller.
 The situation also arises with multicast requests. If a request is sent via multicast, it
is possible that it will generate multiple responses from different servers. but vary in
the To tag
 The "tag" MUST be added by UAS, registrars and redirect servers, but MUST NOT be
inserted into responses forwarded upstream by proxies. The "tag" is added for all
definitive responses for all methods, and MAY be added for informational responses
from a UAS or redirect server.
 Note that every message has the same From tag, but the To tags differ from client to
client. Eventually, someone will answer the call with a 200 OK and the remaining
dialog(s) will be cancelled. Along with Call-ID, those tags allow you to identify which
call to keep and which call(s) to release.
SIP FORKING
 Definition of fork : is an operation whereby a process creates a copy of
itself.
 In SIP terminology , Single SIP call is send to multiple SIP endpoints in i.e
Laptop or Mobile or Landline etc or If a request is sent via multicast
 The forking of SIP requests means that multiple dialogs can be established
from a single request. This also explains the need for the two-sided dialog
identifier; without a contribution from the recipients, the originator could not
disambiguate the multiple dialogs established from a single request.
 A proxy MUST NOT insert a tag into the To header field of a 1xx or 2xx
response if the request did not contain one. A proxy MUST NOT modify the
tag in the To header field of a 1xx or 2xx response.
Together Played to Serve:
 Dialogs are identified using Call-ID, From tag, and To tag. Messages that have
these three identifiers same belong to the same dialog.
 CSeq header field is used to order messages, in fact it is used to order messages
within a dialog. The number must be monotonically increased for each message
sent within a dialog otherwise the peer will handle it as out of order request or
retransmission.
 When a user agent receives a request, it checks the Call-ID against those of in-
progress calls. If the Call-ID was found, it compares the tag value of To with the
user's tag and rejects the request if the two do not match.
 If the From header, including any tag value, matches the value for an existing call
leg, the server compares the CSeq header field value. If less than or equal to the
current sequence number, the request is a retransmission. Otherwise, it is a new
request. If the From header does not match an existing call leg,a new call leg is
created.
Summary
 The combination of the To tag, From tag, and Call-ID completely defines a peer-to-
peer SIP relationship between Caller and Callee and is referred to as a dialog.
 The BranchID and Cseq serves purpose to identify the transaction and order delivery.
 In case of re-INVITE, when it was done from the called party/terminating number
from the initial INVITE, the To and From header gets exchanged, and so the From tag
and To-Tag.
 The UAC puts its tag in the From header and the UAS puts its tag in the To header. So,
when a message leaves a UAC it has one tag in the From header and there is no tag in
the To header. When a UAS receives that message and responds back with a SIP
response (e.g. 180 Ringing), it then adds a tag to the To header.
Courtesy:- RFC & Books
 RFC3261 - SIP: Session Initiation Protocol
 RFC3581 - An Extension to the Session Initiation Protocol (SIP) for Symmetric
Response Routing
 http://www.kamailio.org/docs/tutorials/sip-introduction/
 https://telconotes.wordpress.com/2013/03/13/sip-transactions-vs-dialogs/
 https://stackoverflow.com/questions/26264207/what-is-the-use-of-from-tag-in-
sip-request
 Internet Multimedia Communications Using SIP: A Modern Approach Including
 SIP: Understanding the Session Initiation Protocol
Thanks for Listening
Be Happy and Make Happy
@how? given by my aasaan:-
#Go below what you have # Dream above what you have # First love what you have
#Spread info what you have # Get info what others have # Help as per what you have

More Related Content

What's hot

Session Initiation Protocol
Session Initiation ProtocolSession Initiation Protocol
Session Initiation Protocol
Matt Bynum
 
SIP - The Basics
SIP - The BasicsSIP - The Basics
SIP - The Basics
Jonas Borjesson
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
Houman Sadeghi Kaji
 
SIP security in IP telephony
SIP security in IP telephonySIP security in IP telephony
SIP security in IP telephony
PaloSanto Solutions
 
Session initiation-protocol
Session initiation-protocolSession initiation-protocol
Session initiation-protocolSanthosh Somu
 
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
Vikas Shokeen
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
Fred Posner
 
VoLTE flows - basics
VoLTE flows - basicsVoLTE flows - basics
VoLTE flows - basics
Karel Berkovec
 
Ims conference-call
Ims conference-callIms conference-call
Ims conference-call
Govind Dolare
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
Kent Loh
 
FreeSWITCH as a Kickass SBC
FreeSWITCH as a Kickass SBCFreeSWITCH as a Kickass SBC
FreeSWITCH as a Kickass SBC
Moises Silva
 
ims registration call flow procedure volte sip
ims registration call flow procedure volte sipims registration call flow procedure volte sip
ims registration call flow procedure volte sip
Vikas Shokeen
 
VoIP Wars: Attack of the Cisco Phones
VoIP Wars: Attack of the Cisco PhonesVoIP Wars: Attack of the Cisco Phones
VoIP Wars: Attack of the Cisco Phones
Fatih Ozavci
 
Voice over internet protocol (VoIP)
 Voice over internet protocol (VoIP)  Voice over internet protocol (VoIP)
Voice over internet protocol (VoIP)
Namra Afzal
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Crocodile WebRTC SDK and Cloud Signalling Network
 
Aboutsip - SIP Routing
Aboutsip - SIP RoutingAboutsip - SIP Routing
Aboutsip - SIP Routing
Jonas Borjesson
 
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFBSRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
Vikas Shokeen
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study Notes
Marius FAILLOT DEVARRE
 
Indroduction to SIP
Indroduction to SIPIndroduction to SIP
Indroduction to SIP
Chien Cheng Wu
 
rtpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scalertpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scale
Andreas Granig
 

What's hot (20)

Session Initiation Protocol
Session Initiation ProtocolSession Initiation Protocol
Session Initiation Protocol
 
SIP - The Basics
SIP - The BasicsSIP - The Basics
SIP - The Basics
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
 
SIP security in IP telephony
SIP security in IP telephonySIP security in IP telephony
SIP security in IP telephony
 
Session initiation-protocol
Session initiation-protocolSession initiation-protocol
Session initiation-protocol
 
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
volte call flow - SIP IMS Call Flow - MO and MT Call - Volte Mobile originati...
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
 
VoLTE flows - basics
VoLTE flows - basicsVoLTE flows - basics
VoLTE flows - basics
 
Ims conference-call
Ims conference-callIms conference-call
Ims conference-call
 
IMS Registration Flow
IMS Registration FlowIMS Registration Flow
IMS Registration Flow
 
FreeSWITCH as a Kickass SBC
FreeSWITCH as a Kickass SBCFreeSWITCH as a Kickass SBC
FreeSWITCH as a Kickass SBC
 
ims registration call flow procedure volte sip
ims registration call flow procedure volte sipims registration call flow procedure volte sip
ims registration call flow procedure volte sip
 
VoIP Wars: Attack of the Cisco Phones
VoIP Wars: Attack of the Cisco PhonesVoIP Wars: Attack of the Cisco Phones
VoIP Wars: Attack of the Cisco Phones
 
Voice over internet protocol (VoIP)
 Voice over internet protocol (VoIP)  Voice over internet protocol (VoIP)
Voice over internet protocol (VoIP)
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
 
Aboutsip - SIP Routing
Aboutsip - SIP RoutingAboutsip - SIP Routing
Aboutsip - SIP Routing
 
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFBSRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
SRVCC (Single Radio Voice Call Continuity) in VoLTE & Comparison with CSFB
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study Notes
 
Indroduction to SIP
Indroduction to SIPIndroduction to SIP
Indroduction to SIP
 
rtpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scalertpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scale
 

Similar to SIP: Call Id, Cseq, Via-branch, From & To-tag role play

Hacking Trust Relationships Between SIP Gateways
Hacking Trust Relationships Between SIP GatewaysHacking Trust Relationships Between SIP Gateways
Hacking Trust Relationships Between SIP GatewaysFatih Ozavci
 
Sip Paper
Sip PaperSip Paper
Sip Paper
rhamietron
 
Session Initiation Protocol (SIP)– Via Header Detailed Coverage
Session Initiation Protocol (SIP)– Via Header Detailed Coverage Session Initiation Protocol (SIP)– Via Header Detailed Coverage
Session Initiation Protocol (SIP)– Via Header Detailed Coverage
Sridhar Kumar N
 
Introduction To SIP
Introduction  To  SIPIntroduction  To  SIP
Introduction To SIP
Chris McAndrew
 
Understanding Session Border Controllers
Understanding Session Border ControllersUnderstanding Session Border Controllers
Understanding Session Border Controllers
stefansayer
 
Sip server technicaloverviewwhitepaper
Sip server technicaloverviewwhitepaperSip server technicaloverviewwhitepaper
Sip server technicaloverviewwhitepaper
sirajsamad
 
Sip crash course
Sip crash courseSip crash course
Sip crash course
Jonas Borjesson
 
1 VoIP Overview[1]
1 VoIP Overview[1]1 VoIP Overview[1]
1 VoIP Overview[1]William Giba
 
Review of SIP based DoS attacks
Review of SIP based DoS attacksReview of SIP based DoS attacks
Review of SIP based DoS attacks
Editor IJCATR
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip OverviewMayank Vora
 
1 Vo I P Overview
1  Vo I P  Overview1  Vo I P  Overview
1 Vo I P OverviewMayank Vora
 
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIPAN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
Sean Flores
 
Sip
SipSip
Authenticated Identites in VoIP Call Control
Authenticated Identites in VoIP Call ControlAuthenticated Identites in VoIP Call Control
Authenticated Identites in VoIP Call Control
Warren Bent
 
Presentation To Vo Ip Round Table V2
Presentation To Vo Ip Round Table V2Presentation To Vo Ip Round Table V2
Presentation To Vo Ip Round Table V2Warren Bent
 
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdfD04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
ElyDaliman
 
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
Vikas Shokeen
 
Seminar on Voip Challenges and Countermeasures
Seminar on Voip Challenges and Countermeasures Seminar on Voip Challenges and Countermeasures
Seminar on Voip Challenges and Countermeasures Deepak Mishra
 
VoIP - Cisco CME & IP Communicator
VoIP - Cisco CME & IP CommunicatorVoIP - Cisco CME & IP Communicator
VoIP - Cisco CME & IP Communicatorchinmaypadhye1985
 

Similar to SIP: Call Id, Cseq, Via-branch, From & To-tag role play (20)

Hacking Trust Relationships Between SIP Gateways
Hacking Trust Relationships Between SIP GatewaysHacking Trust Relationships Between SIP Gateways
Hacking Trust Relationships Between SIP Gateways
 
Sip Paper
Sip PaperSip Paper
Sip Paper
 
Session Initiation Protocol (SIP)– Via Header Detailed Coverage
Session Initiation Protocol (SIP)– Via Header Detailed Coverage Session Initiation Protocol (SIP)– Via Header Detailed Coverage
Session Initiation Protocol (SIP)– Via Header Detailed Coverage
 
Introduction To SIP
Introduction  To  SIPIntroduction  To  SIP
Introduction To SIP
 
Understanding Session Border Controllers
Understanding Session Border ControllersUnderstanding Session Border Controllers
Understanding Session Border Controllers
 
Sip server technicaloverviewwhitepaper
Sip server technicaloverviewwhitepaperSip server technicaloverviewwhitepaper
Sip server technicaloverviewwhitepaper
 
Sip crash course
Sip crash courseSip crash course
Sip crash course
 
1 VoIP Overview[1]
1 VoIP Overview[1]1 VoIP Overview[1]
1 VoIP Overview[1]
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip Overview
 
Review of SIP based DoS attacks
Review of SIP based DoS attacksReview of SIP based DoS attacks
Review of SIP based DoS attacks
 
1 Vo Ip Overview
1 Vo Ip Overview1 Vo Ip Overview
1 Vo Ip Overview
 
1 Vo I P Overview
1  Vo I P  Overview1  Vo I P  Overview
1 Vo I P Overview
 
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIPAN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
AN OVERVIEW OF VOICE OVER INTERNET PROTOCOL (VOIP
 
Sip
SipSip
Sip
 
Authenticated Identites in VoIP Call Control
Authenticated Identites in VoIP Call ControlAuthenticated Identites in VoIP Call Control
Authenticated Identites in VoIP Call Control
 
Presentation To Vo Ip Round Table V2
Presentation To Vo Ip Round Table V2Presentation To Vo Ip Round Table V2
Presentation To Vo Ip Round Table V2
 
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdfD04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
D04.VoLTE SIP Call Flow – Mobile Originating (MO) & Terminating (MT).pdf
 
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
End to End volte ims sip call flow Guide - Mobile originating and Mobile term...
 
Seminar on Voip Challenges and Countermeasures
Seminar on Voip Challenges and Countermeasures Seminar on Voip Challenges and Countermeasures
Seminar on Voip Challenges and Countermeasures
 
VoIP - Cisco CME & IP Communicator
VoIP - Cisco CME & IP CommunicatorVoIP - Cisco CME & IP Communicator
VoIP - Cisco CME & IP Communicator
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

SIP: Call Id, Cseq, Via-branch, From & To-tag role play

  • 1. SIP- CallID, Cseq, Via-Branch, FROM/To-TAG Role Play - Usage Clarifications Sridhar Kumar N
  • 3. Call-ID  Call-ID is so called Call Identifier.  Globally Unique Identifier. Cryptographically random identifiers(RFC 1750) is adopted to avoid traditional pseudo-random number pitfalls. Using cryptographically random identifiers provides some protection against session hijacking and reduces the likelihood of unintentional Call-ID collisions.  It MUST be the same for all requests and responses sent by either UA in a dialog  Call-IDs are case-sensitive and are simply compared byte-by-byte.  A single multimedia conference can give rise to several calls with different Call-IDs, for example, if a user invites a single individual several times to the same (long-running) conference. Examples: Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@biloxi.com i:f81d4fae-7dec-11d0-a765-00a0c91e6bf6@192.0.2.4
  • 5. Cseq - Command Sequence  The CSeq header field serves as a way to identify and order transactions. It consists of a sequence number and a method.  CSeq or Command Sequence contains an integer and a method name. The CSeq number is incremented for each new request within a dialog and is a traditional sequence number.  32-bit unsigned integer and MUST be less than 2**31. i.e within a single call, one request a second for about 136 years before needing to wrap around. Also client can choose from 1 or 31 most significant bits of a 32-bit second clock as an initial sequence number  Exception - ACK and CANCEL  Example: CSeq: 4711 INVITE
  • 6. Via-Branch  The Via header field value MUST contain a branch parameter. The branch parameter value MUST be unique. The exceptions to this rule are CANCEL and ACK for non-2xx responses.  The branch ID inserted by an element compliant with this specification MUST always begin with the characters "z9hG4bK". These 7 characters are used as a magic cookie (7 is deemed sufficient to ensure that an older RFC 2543 implementation would not pick such a value), so that servers receiving the request can determine that the branch ID was constructed in the fashion described by this specification (that is, globally unique).  It now plays the role of a unique transaction identifier. This requirement was added to identify that the branch was created in accordance with RFC 3261 and not the older RFC 2543 which did not require global uniqueness.  It’s Case Insensitive Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds
  • 7. Via-Branch & Cseq –Response Matching  A response matches a client transaction under two conditions:
  • 8. From-TAG  In the old SIP RFC, RFC 2543, the from-tag was optional and in RFC 3261, from-tag is mandatory.  Call-ID is not necessarily unique for all new requests from the same UAC. It can be reused when, for example, retrying an INVITE with credentials after receiving a 401 Unauthorized response. From RFC 3261 §8.1.1.4: Note that when requests are retried after certain failure responses ,these retried requests are not considered new requests, and therefore do not need new Call-ID header fields;  Also For SIP Dialogue, It makes things symmetrical. It's easier to think about the dialog ID when your dialog always has a local-tag and remote-tag, whether you were the initiator of the dialog or not. And It's also easier to distinguish between initial and subsequent requests in a dialog, i.e. if no to-tag then it must be an initial request  Also It’s Serves purpose for “The Join header is used to logically join an existing SIP dialog with a new SIP dialog SIP dialog (using call-id, to-tag, and from-tag) i.e Actually we don’t have clarity that why FROM-TAG is mandatory. But RFC made mandatory. Hence all are following. May be in future, we can see the fruits. But currently It’s purpose is joining with Call- ID and TO-tag forms Dialogue Identity.
  • 9. TO-Tag  It’s a must add TAG parameter in response message by UAS.  The "tag" parameter serves as a general mechanism to distinguish multiple instances of a user identified by a single SIP URL. As proxies can fork requests, the same request can reach multiple instances of a user (mobile and home phones, for example). As each can respond, there needs to be a means to distinguish the responses from each at the caller.  The situation also arises with multicast requests. If a request is sent via multicast, it is possible that it will generate multiple responses from different servers. but vary in the To tag  The "tag" MUST be added by UAS, registrars and redirect servers, but MUST NOT be inserted into responses forwarded upstream by proxies. The "tag" is added for all definitive responses for all methods, and MAY be added for informational responses from a UAS or redirect server.  Note that every message has the same From tag, but the To tags differ from client to client. Eventually, someone will answer the call with a 200 OK and the remaining dialog(s) will be cancelled. Along with Call-ID, those tags allow you to identify which call to keep and which call(s) to release.
  • 10. SIP FORKING  Definition of fork : is an operation whereby a process creates a copy of itself.  In SIP terminology , Single SIP call is send to multiple SIP endpoints in i.e Laptop or Mobile or Landline etc or If a request is sent via multicast  The forking of SIP requests means that multiple dialogs can be established from a single request. This also explains the need for the two-sided dialog identifier; without a contribution from the recipients, the originator could not disambiguate the multiple dialogs established from a single request.  A proxy MUST NOT insert a tag into the To header field of a 1xx or 2xx response if the request did not contain one. A proxy MUST NOT modify the tag in the To header field of a 1xx or 2xx response.
  • 11. Together Played to Serve:  Dialogs are identified using Call-ID, From tag, and To tag. Messages that have these three identifiers same belong to the same dialog.  CSeq header field is used to order messages, in fact it is used to order messages within a dialog. The number must be monotonically increased for each message sent within a dialog otherwise the peer will handle it as out of order request or retransmission.  When a user agent receives a request, it checks the Call-ID against those of in- progress calls. If the Call-ID was found, it compares the tag value of To with the user's tag and rejects the request if the two do not match.  If the From header, including any tag value, matches the value for an existing call leg, the server compares the CSeq header field value. If less than or equal to the current sequence number, the request is a retransmission. Otherwise, it is a new request. If the From header does not match an existing call leg,a new call leg is created.
  • 12. Summary  The combination of the To tag, From tag, and Call-ID completely defines a peer-to- peer SIP relationship between Caller and Callee and is referred to as a dialog.  The BranchID and Cseq serves purpose to identify the transaction and order delivery.  In case of re-INVITE, when it was done from the called party/terminating number from the initial INVITE, the To and From header gets exchanged, and so the From tag and To-Tag.  The UAC puts its tag in the From header and the UAS puts its tag in the To header. So, when a message leaves a UAC it has one tag in the From header and there is no tag in the To header. When a UAS receives that message and responds back with a SIP response (e.g. 180 Ringing), it then adds a tag to the To header.
  • 13. Courtesy:- RFC & Books  RFC3261 - SIP: Session Initiation Protocol  RFC3581 - An Extension to the Session Initiation Protocol (SIP) for Symmetric Response Routing  http://www.kamailio.org/docs/tutorials/sip-introduction/  https://telconotes.wordpress.com/2013/03/13/sip-transactions-vs-dialogs/  https://stackoverflow.com/questions/26264207/what-is-the-use-of-from-tag-in- sip-request  Internet Multimedia Communications Using SIP: A Modern Approach Including  SIP: Understanding the Session Initiation Protocol
  • 14. Thanks for Listening Be Happy and Make Happy @how? given by my aasaan:- #Go below what you have # Dream above what you have # First love what you have #Spread info what you have # Get info what others have # Help as per what you have

Editor's Notes

  1. Only 2xx and 101-199 responses with a To tag, where the request was INVITE, will establish a dialog. A dialog established by a non-final response to a request is in the "early" state and it is called an early dialog.
  2. 1xx and 2xx responses may be involved in the establishment of dialogs. When a request does not contain a To tag, the To tag in the response is used by the UAC to distinguish multiple responses to a dialog creating request.