SlideShare ist ein Scribd-Unternehmen logo
1 von 22
About SIP




   An introduction to
Transactions & Dialogs
       Jonas Borjesson




                         @borjessonjonas
NOTE
●   This version has been adapted to be viewed
    without transitions.
●   Go to aboutsip.com to download the original
    version.
●   Also be sure to check out vimeo.com/aboutsip
    for any recorded presentations.
●   Follow @borjessonjonas to receive updates.



                                          @borjessonjonas
re
                                       ca
                    SIP Messages            p

●   SIP – Request/Response model
    ●   UAC sends the request, UAS responds
●   Two types of responses
    ●   Provisional (1xx)
    ●   Final (2xx - 6xx)




                                                @borjessonjonas
Transactions
●   SIP is a transactional protocol.
●   Every request & response goes within a
    transaction.
●   Transactions are independent of each other.
●   SIP transaction:
    ●   1 request                    INVITE
    ●   0..* provisional responses   100 Trying
                                     180 Ringing
    ●   0..* final responses         200 OK




                                                   @borjessonjonas
Client Transactions
●   Responsible for:
    ●   Receiving request from the TU it and...
    ●   Deliver requests reliably to the server transaction
    ●   Processing responses:
        –   Filter out retransmissions
        –   Filter out disallowed responses
        –   Pass response to the TU
    ●   Generating ACK for non 2xx final responses to
        INVITE transactions


                                                     @borjessonjonas
Server Transactions
●   Responsible for:
    ●   Receive requests and pass them up the TU
    ●   Filter out any retransmissions
    ●   Accepts responses from the TU and sends them.
    ●   Absorbing the ACK request for non 2xx final
        responses on invite transactions




                                                      @borjessonjonas
Transaction Relationships




                           request                                              request                                              request
                                      server transaction




                                                                                           server transaction




                                                                                                                                                  server transaction
                                                                                                                client transaction
      client transaction




                                                           client transaction



                           response                                             response                                             response




UAC                                      Outbound                                                  Inbound                                                             UAS
                                          Proxy                                                     Proxy
                                                                                                                                                @borjessonjonas
Transaction Identifier
  ●   Each transaction is uniquely identified by:
      ●   the branch-id on the Via-header plus
      ●   the Cseq header
  ●   3261 branch-id starts with “z9hG4bK”

  INVITE sip:bob@aboutsip.com SIP/2.0
3 Via: SIP/2.0/UDP <ip_3>;branch=z9hG4bK-lkjsalkfjoijlkjlkj
2 Via: SIP/2.0/UDP <ip_2>;branch=z9hG4bK-8jijlk-asfk-iji0kj
1 Via: SIP/2.0/TCP <ip_1>;branch=z9hG4bK-llkowe-lkjko39d
  CSeq: 1 INVITE
  ...
                                                  @borjessonjonas
Transaction Lifecycle
●    Slightly different depending on:
      ●    Server or client transaction
      ●    Invite or non-invite transaction
      ●    Reliable vs. non-reliable transport (e.g. udp vs tcp)
●    To summarize them all*
      ●    Starts when request is sent or received
      ●    Final responses takes it to completed state
      ●    Timer fires and moves it to terminated state.

    *You can't really group them together like this. Please view this information as a very generic
    summary of the life cycle of a SIP transaction. In reality, it is much more complicated.
                                                                                                      @borjessonjonas
Dialogs

 ?

     !


          @borjessonjonas
Dialogs
●   Dialogs are extremely important within SIP
●   A dialog:
    ●   represent a p2p relation between two SIP
        endpoints.
    ●   exists for some time
    ●   contains important routing information
    ●   facilitates proper sequencing of messages
    ●   consists of a sequence of transactions



                                                    @borjessonjonas
Dialog establishing methods
●   Not all methods establish a dialog!
●   The ones that do are:
    ●   INVITE (RFC 3261)
        –   For establishing a dialog
    ●   SUBSCRIBE (RFC 3265)
        –   Creates a subscription. Used e.g. in presence scenarios
    ●   REFER (RFC 3515)
        –   Also a subscription but only for the refer event-package.
            Used e.g. for call transfer



                                                            @borjessonjonas
INVITE Scenario

               INVITE sip:bob@aboutsip.com

                       100 Trying
transaction           180 Ringing

                        200 OK

                         ACK
transaction                                  dialog



                          BYE

transaction             200 OK




                                                      @borjessonjonas
Dialog Id
●   A dialog is uniquely identified by:
    ●   The Call-ID header
    ●   The remote-tag
    ●   The local-tag
●   My remote tag is your local tag and vice versa
●   Therefore, the dialog id is different for both
    ends (a very common thing SIP stacks mess up)
SIP/2.0 200 OK
To: <sip:bob@aboutsip.com>;tag=e103a059-a9ca-4bc2-96d1-779636810bfe
From: <sip:alice@aboutsip.com>;tag=f7389c89-ee9f-4802-af3e-636ce53883cb
Call-ID: 9d8eccee-02f2-4952-a1bf-01fe1bae45d6
CSeq: 2 INVITE
Contact: <sip:127.0.0.1:1557;transport=TCP>
                                                                   @borjessonjonas
Establishing a dialog
●   UAC                                     ●   UAS
                                                ●   establishes the dialog
    ●   creates the initial
                                                    through a 2xx final
        request.
                                                    response
    ●   Fills in “half” of the                  ●   fills in the other “half” of
        dialog-id.                                  the dialog-id.


    INVITE sip:bob@aboutsip.com
    From: alice@aboutsip.com ;tag=kjlkjoilkjlkjasdflkj
    To: sip:bob@aboutsip.com
    Call-ID: lkjasdlfkjasldkfjla

                             200 OK
                             From: alice@aboutsip.com;tag=kjlkjoilkjlkjasdflkj
                             To: sip:bob@aboutsip.com;tag=abckjo219898df
                             Call-ID: lkjasdlfkjasldkfjla
                                                                         @borjessonjonas
Subsequent Requests
●   Requests that goes within an established dialog
    are called subsequent requests
●   Subsequent requests follow the established
    route




       INVITE
       BYE                                  @borjessonjonas
To Complicate things...
●   There is such a thing as early-dialogs.
●   One INVITE request can be forked and create
    multiple dialogs.
                                              e
                                           bil
                                         mo
                                        @
                                     bob
                                 E
                            V IT
                          IN
         INVITE bob
                               INV
                                  ITE
                                         bob
                                               @w
                                                  or   k




                                                           @borjessonjonas
Tearing down a dialog
●   Depends on the method
    ●   BYE request for INVITE dialogs
    ●   Un-subscribe request for SUBSCRIBE dialogs
    ●   REFER dialogs typically die when the reference to
        which the subscription is referring to goes away.
●   Of course, lots of corner cases that can lead to
    the destruction of a dialog...




                                                  @borjessonjonas
Summary




          @borjessonjonas
Transactions
●   Consists of 1 request and 0..* responses
●   Two types of transactions:
    ●   Invite transactions
    ●   Non-Invite transactions
●   The branch-id on the Via uniquely identifies the
    transaction (plus the Cseq)




                                               @borjessonjonas
Dialogs
●   Consists of a sequence of transactions
●   Not all methods establish dialogs.
●   Represent a p2p relation between two SIP
    endpoints.
●   Contains routing information.
●   The dialog-id is different for the two parties.




                                                @borjessonjonas
More presentations and material
        at aboutsip.com

           Thanks!




                                  @borjessonjonas

Weitere ähnliche Inhalte

Was ist angesagt?

Overview of ZeroMQ
Overview of ZeroMQOverview of ZeroMQ
Overview of ZeroMQpieterh
 
Kamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficKamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficDaniel-Constantin Mierla
 
ACI MultiPod Config Guide
ACI MultiPod Config GuideACI MultiPod Config Guide
ACI MultiPod Config GuideWoo Hyung Choi
 
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 scaleAndreas Granig
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみたMasakazu Asama
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)William Lee
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始めtetsusat
 
Developing rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKDeveloping rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKSaúl Ibarra Corretgé
 
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...ALTANAI BISHT
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Olle E Johansson
 
Kamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionKamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionOlle E Johansson
 
Kamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouKamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouFred Posner
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.Naoto MATSUMOTO
 
SIPREC RTPEngine Media Forking
SIPREC RTPEngine Media ForkingSIPREC RTPEngine Media Forking
SIPREC RTPEngine Media ForkingHossein Yavari
 
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹InfraEngineer
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The AnswerIan Barber
 
Apache ZooKeeper 소개
Apache ZooKeeper 소개Apache ZooKeeper 소개
Apache ZooKeeper 소개중선 곽
 

Was ist angesagt? (20)

HTTP/3 for everyone
HTTP/3 for everyoneHTTP/3 for everyone
HTTP/3 for everyone
 
Overview of ZeroMQ
Overview of ZeroMQOverview of ZeroMQ
Overview of ZeroMQ
 
Kamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficKamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade Traffic
 
ACI MultiPod Config Guide
ACI MultiPod Config GuideACI MultiPod Config Guide
ACI MultiPod Config Guide
 
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
 
MAP 実装してみた
MAP 実装してみたMAP 実装してみた
MAP 実装してみた
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始め
 
Developing rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDKDeveloping rich SIP applications with SIPSIMPLE SDK
Developing rich SIP applications with SIPSIMPLE SDK
 
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.
 
Kamailio :: A Quick Introduction
Kamailio :: A Quick IntroductionKamailio :: A Quick Introduction
Kamailio :: A Quick Introduction
 
Kamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and YouKamailio, FreeSWITCH, and You
Kamailio, FreeSWITCH, and You
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
SIPREC RTPEngine Media Forking
SIPREC RTPEngine Media ForkingSIPREC RTPEngine Media Forking
SIPREC RTPEngine Media Forking
 
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
[MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
Apache ZooKeeper 소개
Apache ZooKeeper 소개Apache ZooKeeper 소개
Apache ZooKeeper 소개
 
Kamailio - API Based SIP Routing
Kamailio - API Based SIP RoutingKamailio - API Based SIP Routing
Kamailio - API Based SIP Routing
 

Ähnlich wie Aboutsip - intro to transactions and dialogs

Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00t
Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00tDefcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00t
Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00tpseudor00t overflow
 
Mysql Relay log - the unsung hero
Mysql Relay log - the unsung heroMysql Relay log - the unsung hero
Mysql Relay log - the unsung herovishnu rao
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodGalin Dinkov
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failuresMarian Marinov
 
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!RustyQRussell
 
Twisted Introduction
Twisted IntroductionTwisted Introduction
Twisted Introductioncyli
 
Introduciendo Wombat 2.0`
Introduciendo Wombat 2.0`Introduciendo Wombat 2.0`
Introduciendo Wombat 2.0`OpenDireito
 
JavaOne - A Sip Of Java - RJ Auburn
JavaOne - A Sip Of Java - RJ AuburnJavaOne - A Sip Of Java - RJ Auburn
JavaOne - A Sip Of Java - RJ AuburnVoxeo Corp
 
V2 d2013 emil ivov - jitsi
V2 d2013   emil ivov - jitsiV2 d2013   emil ivov - jitsi
V2 d2013 emil ivov - jitsiVOIP2DAY
 
Offensive Security with Metasploit
Offensive Security with MetasploitOffensive Security with Metasploit
Offensive Security with Metasploitegypt
 
Pushing a camel through the eye of a needle
Pushing a camel through the eye of a needlePushing a camel through the eye of a needle
Pushing a camel through the eye of a needleSensePost
 
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...DevClub_lv
 

Ähnlich wie Aboutsip - intro to transactions and dialogs (18)

Sip2012 :: outbound
Sip2012 :: outboundSip2012 :: outbound
Sip2012 :: outbound
 
IEEE latincom2012
IEEE latincom2012IEEE latincom2012
IEEE latincom2012
 
Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00t
Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00tDefcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00t
Defcon 21-ozavci-vo ip-wars-return-of-the-sip by pseudor00t
 
Mysql Relay log - the unsung hero
Mysql Relay log - the unsung heroMysql Relay log - the unsung hero
Mysql Relay log - the unsung hero
 
Switcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart ContractsSwitcheo Network - Advanced NEO Smart Contracts
Switcheo Network - Advanced NEO Smart Contracts
 
Bitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the HoodBitcoin Blockchain - Under the Hood
Bitcoin Blockchain - Under the Hood
 
What's up with SIP?
What's up with SIP?What's up with SIP?
What's up with SIP?
 
Let's Encrypt failures
Let's Encrypt failuresLet's Encrypt failures
Let's Encrypt failures
 
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!
Pettycoin: Losing Tiny Amounts of Bitcoin At Scale!
 
Kamailio - SIP Servers Everywhere
Kamailio - SIP Servers EverywhereKamailio - SIP Servers Everywhere
Kamailio - SIP Servers Everywhere
 
Twisted Introduction
Twisted IntroductionTwisted Introduction
Twisted Introduction
 
Introduciendo Wombat 2.0`
Introduciendo Wombat 2.0`Introduciendo Wombat 2.0`
Introduciendo Wombat 2.0`
 
SIP security in IP telephony
SIP security in IP telephonySIP security in IP telephony
SIP security in IP telephony
 
JavaOne - A Sip Of Java - RJ Auburn
JavaOne - A Sip Of Java - RJ AuburnJavaOne - A Sip Of Java - RJ Auburn
JavaOne - A Sip Of Java - RJ Auburn
 
V2 d2013 emil ivov - jitsi
V2 d2013   emil ivov - jitsiV2 d2013   emil ivov - jitsi
V2 d2013 emil ivov - jitsi
 
Offensive Security with Metasploit
Offensive Security with MetasploitOffensive Security with Metasploit
Offensive Security with Metasploit
 
Pushing a camel through the eye of a needle
Pushing a camel through the eye of a needlePushing a camel through the eye of a needle
Pushing a camel through the eye of a needle
 
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...
How We Test Audio Quality In VoIP Applications by Rihards Skrebelis from Test...
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Kürzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Aboutsip - intro to transactions and dialogs

  • 1. About SIP An introduction to Transactions & Dialogs Jonas Borjesson @borjessonjonas
  • 2. NOTE ● This version has been adapted to be viewed without transitions. ● Go to aboutsip.com to download the original version. ● Also be sure to check out vimeo.com/aboutsip for any recorded presentations. ● Follow @borjessonjonas to receive updates. @borjessonjonas
  • 3. re ca SIP Messages p ● SIP – Request/Response model ● UAC sends the request, UAS responds ● Two types of responses ● Provisional (1xx) ● Final (2xx - 6xx) @borjessonjonas
  • 4. Transactions ● SIP is a transactional protocol. ● Every request & response goes within a transaction. ● Transactions are independent of each other. ● SIP transaction: ● 1 request INVITE ● 0..* provisional responses 100 Trying 180 Ringing ● 0..* final responses 200 OK @borjessonjonas
  • 5. Client Transactions ● Responsible for: ● Receiving request from the TU it and... ● Deliver requests reliably to the server transaction ● Processing responses: – Filter out retransmissions – Filter out disallowed responses – Pass response to the TU ● Generating ACK for non 2xx final responses to INVITE transactions @borjessonjonas
  • 6. Server Transactions ● Responsible for: ● Receive requests and pass them up the TU ● Filter out any retransmissions ● Accepts responses from the TU and sends them. ● Absorbing the ACK request for non 2xx final responses on invite transactions @borjessonjonas
  • 7. Transaction Relationships request request request server transaction server transaction server transaction client transaction client transaction client transaction response response response UAC Outbound Inbound UAS Proxy Proxy @borjessonjonas
  • 8. Transaction Identifier ● Each transaction is uniquely identified by: ● the branch-id on the Via-header plus ● the Cseq header ● 3261 branch-id starts with “z9hG4bK” INVITE sip:bob@aboutsip.com SIP/2.0 3 Via: SIP/2.0/UDP <ip_3>;branch=z9hG4bK-lkjsalkfjoijlkjlkj 2 Via: SIP/2.0/UDP <ip_2>;branch=z9hG4bK-8jijlk-asfk-iji0kj 1 Via: SIP/2.0/TCP <ip_1>;branch=z9hG4bK-llkowe-lkjko39d CSeq: 1 INVITE ... @borjessonjonas
  • 9. Transaction Lifecycle ● Slightly different depending on: ● Server or client transaction ● Invite or non-invite transaction ● Reliable vs. non-reliable transport (e.g. udp vs tcp) ● To summarize them all* ● Starts when request is sent or received ● Final responses takes it to completed state ● Timer fires and moves it to terminated state. *You can't really group them together like this. Please view this information as a very generic summary of the life cycle of a SIP transaction. In reality, it is much more complicated. @borjessonjonas
  • 10. Dialogs ? ! @borjessonjonas
  • 11. Dialogs ● Dialogs are extremely important within SIP ● A dialog: ● represent a p2p relation between two SIP endpoints. ● exists for some time ● contains important routing information ● facilitates proper sequencing of messages ● consists of a sequence of transactions @borjessonjonas
  • 12. Dialog establishing methods ● Not all methods establish a dialog! ● The ones that do are: ● INVITE (RFC 3261) – For establishing a dialog ● SUBSCRIBE (RFC 3265) – Creates a subscription. Used e.g. in presence scenarios ● REFER (RFC 3515) – Also a subscription but only for the refer event-package. Used e.g. for call transfer @borjessonjonas
  • 13. INVITE Scenario INVITE sip:bob@aboutsip.com 100 Trying transaction 180 Ringing 200 OK ACK transaction dialog BYE transaction 200 OK @borjessonjonas
  • 14. Dialog Id ● A dialog is uniquely identified by: ● The Call-ID header ● The remote-tag ● The local-tag ● My remote tag is your local tag and vice versa ● Therefore, the dialog id is different for both ends (a very common thing SIP stacks mess up) SIP/2.0 200 OK To: <sip:bob@aboutsip.com>;tag=e103a059-a9ca-4bc2-96d1-779636810bfe From: <sip:alice@aboutsip.com>;tag=f7389c89-ee9f-4802-af3e-636ce53883cb Call-ID: 9d8eccee-02f2-4952-a1bf-01fe1bae45d6 CSeq: 2 INVITE Contact: <sip:127.0.0.1:1557;transport=TCP> @borjessonjonas
  • 15. Establishing a dialog ● UAC ● UAS ● establishes the dialog ● creates the initial through a 2xx final request. response ● Fills in “half” of the ● fills in the other “half” of dialog-id. the dialog-id. INVITE sip:bob@aboutsip.com From: alice@aboutsip.com ;tag=kjlkjoilkjlkjasdflkj To: sip:bob@aboutsip.com Call-ID: lkjasdlfkjasldkfjla 200 OK From: alice@aboutsip.com;tag=kjlkjoilkjlkjasdflkj To: sip:bob@aboutsip.com;tag=abckjo219898df Call-ID: lkjasdlfkjasldkfjla @borjessonjonas
  • 16. Subsequent Requests ● Requests that goes within an established dialog are called subsequent requests ● Subsequent requests follow the established route INVITE BYE @borjessonjonas
  • 17. To Complicate things... ● There is such a thing as early-dialogs. ● One INVITE request can be forked and create multiple dialogs. e bil mo @ bob E V IT IN INVITE bob INV ITE bob @w or k @borjessonjonas
  • 18. Tearing down a dialog ● Depends on the method ● BYE request for INVITE dialogs ● Un-subscribe request for SUBSCRIBE dialogs ● REFER dialogs typically die when the reference to which the subscription is referring to goes away. ● Of course, lots of corner cases that can lead to the destruction of a dialog... @borjessonjonas
  • 19. Summary @borjessonjonas
  • 20. Transactions ● Consists of 1 request and 0..* responses ● Two types of transactions: ● Invite transactions ● Non-Invite transactions ● The branch-id on the Via uniquely identifies the transaction (plus the Cseq) @borjessonjonas
  • 21. Dialogs ● Consists of a sequence of transactions ● Not all methods establish dialogs. ● Represent a p2p relation between two SIP endpoints. ● Contains routing information. ● The dialog-id is different for the two parties. @borjessonjonas
  • 22. More presentations and material at aboutsip.com Thanks! @borjessonjonas