Search code examples
sessiondialogsip

Difference between dialog and session in SIP?


What exactly is the difference between a dialog and a session? Does dialog mean a "call has already been setup" in the signaling sense, while a session mean the "media has already been setup" in the media sense?

Also, what does "part of a dialog" mean? Are "INVITE", "ACK" and the responses considered "part of a dialog"?


Solution

  • From the Definition section in RFC 3261:

    Dialog: A dialog is a peer-to-peer SIP relationship between two
       UAs that persists for some time.  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 in RFC
       2543.
    

    while

    Session: From the SDP specification: "A multimedia session is a
       set of multimedia senders and receivers and the data streams
       flowing from senders to receivers.  A multimedia conference is
       an example of a multimedia session." (RFC 2327 [1]) (A session
       as defined for SDP can comprise one or more RTP sessions.)  As
       defined, a callee can be invited several times, by different
       calls, to the same session.  If SDP is used, a session is
       defined by the concatenation of the SDP user name, session id,
       network type, address type, and address elements in the origin
       field.
    

    In my own words: A SIP dialog refers to the signaling relationship between two peers. A SIP dialog can be used to establish calls (INVITE), but there are other SIP methods that could establish a dialog (e.g. SUBSCRIBE)

    A (multimedia) session is exchanged through a SIP dialog initiated by an INVITE method, using the SDP offer/answer (see RFC 3264)