Subject: Re: [Sip] [SIPForum-discussion] What's the difference between session and dialog in SIP?

From: Mahesh Anjanappa <[email-masked]>
Date: Thu, 01 May 2008 16:00:30 +0530

> Mahesh Anjanappa wrote:
>>> I'm not fully understanding what you are proposing (see questions 
>>> above). I expect that it may start to fall apart in the details of 
>>> particular use cases. Will you explain to me how your definition relates 
>>> to the use case with A/B/C/D that I gave?
>>
>> OK,let me see.
>> A, C and D get into a Session/Contract to communicate using Video and 
>> Audio.
>
> I guess you misunderstand what I was describing.
>
> The SDP negotiated between A and B contains both audio and video.
>
> The SDP negotiated between B and C contains only audio. (B didn't offer 
> the video to C.)
>
> The SDP negotiated between B and D contains only video. (B didn't offer 
> the video to D.)
>
> The purpose of B is to consolidate an audio-only device and a video-only 
> device into what seems, to A, like one audio/video device.

OK. In this case, there is one session between A and B. A doesnt know
anything about C & D. As far A is concerned it is communicating with B with
modality of Audio+Video. B sets up individual sessions with C and D.
(B is purpose-built just to send the Audio and Video to C & D resp.)
It seems to A as though B is one audio/video device.
C does not know about A & D nor does D know about A and C. So basically
there are 3 individual sessions and not a conference since A,C and D
are not aware of each other. All they do, is have their individual contract 
with
B. In contrast to a Conference wherein A,C and D would have been aware
about each other and a common contract hence a single session .

>
> They don't all have the same contract. So by your definition I don't think 
> they can all have one session.
>
> In some conceptual sense you may think of this as one session. But its 
> hard to find any tangible item that they all have that refers to a single 
> session. In the end, from the point of view of B it may indeed be one 
> session. But A, C, and D can't perceive that.
>
>> The contract allows for either of the Media to be used hence C uses audio
>> and D uses video. B facilitates the Contract by holding the three 
>> dialogs.
>> The 3 dialogs are tied together by a Conference Id (i suppose)
>> thus COnference Id representing the Session Identifier.B too is 
>> considered a party in the
>> session though its role is different from that of A,C and D.
>
> If this were done with a conference mixer, and hence there was a 
> conference id, then I guess you could say that the conference id was an 
> identifier for the "session".
>
> But if B was purpose-built for this particular functionality, and there is 
> no conference id, then what?

There are separate Session Id's for each of the three sessions, probably the
Session id carried in the SDP(but not neccessarily). A, C & D, each will be
bothered about ONLY their respective Session Id's (one each) with B.
B is aware of all the session id's and would want to collate them for an app
specific reason but not for the notion of  *SIP Session* that we discuss 
here.
In simple words,even B sees it as 3 SIP Sessions rather than 1 though the
three collated by some logic by B.

>
> And in a simple call between A and C there would be no conference id, so 
> something else must serve as the "session" identifier. But in that case, 
> it would seem that these aren't the *same* notion of session.
>
> You asked why I didn't think it was important to define session. I will 
> admit that it seems odd to have a Session Initiation Protocol without a 
> clear idea of what this "session" is that it is initiating. So it indeed 
> would be *nice* to have a definition that covers all the cases.
>
> But not having one doesn't seem to be preventing anyone from doing 
> anything, does it?

Thats right, it doesnt prevent anyone from doing "anything", everybody
does their own thing since no single guiding principle. Look at  what,
has happened with INFO :-). Anyway, its just my opinion, i shall not
cause further degression from the actual technical topic at hand :-)

> From a practical perspective I think the thing that is being initiated by 
> SIP is the contract established by a matching offer/answer. That is fairly 
> straightforward when the UAC and UAS are the offerer and answerer, or visa 
> versa. It gets messy when other UAs are involved in the construction of 
> the offer and the answer. And in those cases it gets really hard to figure 
> out what the session is, because not all the parties will agree.

Right, so dont you feel there a loose end somewhere and need to be tied.

> Paul
>
>>> Paul
>>>
>>>> regards
>>>> Mahesh
>>>>
>>>> ----- Original Message ----- From: "Paul Kyzivat" <[email-masked]>
>>>> To: "gaurav katiyar" <[email-masked]>
>>>> Cc: <[email-masked]>; <[email-masked]>; <[email-masked]>
>>>> Sent: Tuesday, April 29, 2008 10:32 PM
>>>> Subject: Re: [Sip] [SIPForum-discussion] What's the difference between 
>>>> session and dialog in SIP?
>>>>
>>>>
>>>>>
>>>>>
>>>>> gaurav katiyar wrote:
>>>>>> Sip "Session Initiation Protocol". It talks about media session, i 
>>>>>> mean
>>>>>> how to initiate, modify and terminate a session and Dialog provides a
>>>>>> sort of context (like caller, callee, location, routing etc.) to 
>>>>>> modify
>>>>>> this session. So dialog is more related to route the sip message to
>>>>>> right node and body (SDP) handles media session if present. Dialogs 
>>>>>> may
>>>>>> have media sessions Or may not.
>>>>>>
>>>>>> Take an example of B2BUA. It is a type of statefull proxy having two
>>>>>> dialog and one media session if doing media routing.
>>>>>
>>>>> Maybe. IMO these concepts aren't sufficiently defined.
>>>>>
>>>>> One view is that a session is whatever SDP describes. Thus its one
>>>>> session regardless of how many media streams it contains. And in the
>>>>> case of an SDP containing multicast media addresses, and possibly
>>>>> advertised via SAP, there could be many participants in the same 
>>>>> session.
>>>>>
>>>>> But then in sip it takes a pair of SDPs to establish a call. Is that 
>>>>> one
>>>>> session, or two? And in your case above with the B2BUA, is it one
>>>>> session, or two, or four?
>>>>>
>>>>> Another view is that a session in the context of sip is whatever is
>>>>> established as a result of an INVITE. Then I guess the pair of SDPs
>>>>> together describe one session, regardless of how many media streams. 
>>>>> But
>>>>> in that case the B2BUA example would be two sessions.
>>>>>
>>>>> Then consider a more complex case:
>>>>>
>>>>>                     audio
>>>>>                  /-------- C
>>>>>                 /
>>>>>   A ========== B
>>>>>     audio       \
>>>>>     video        \-------- D
>>>>>                     video
>>>>>
>>>>> Here B is a B2BUA and media relay as in your example, but one stream 
>>>>> is
>>>>> relayed to C and the other to D.
>>>>>
>>>>> In this case, how many sessions are there? A, C, and D each have one,
>>>>> but are any of those the same? Or are there three altogether?
>>>>>
>>>>> When I see "session" used, I just assume it means something vague, and
>>>>> read on to see what is actually meant.
>>>>>
>>>>> Paul
>>>>>
>>>>>> */Donald Lee <[email-masked]>/* wrote:
>>>>>>
>>>>>>     old good questions in sip, also add another "transaction".
>>>>>>
>>>>>>
>>>>>>     On Fri, Apr 25, 2008 at 8:18 AM, 孙宗君 <[email-masked]
>>>>>>     <mailto:[email-masked]>> wrote:
>>>>>>
>>>>>>         Hi, Vijay
>>>>>>
>>>>>>         Thanks very much for your timely answers.
>>>>>>
>>>>>>          From this specification,  session is a combination of 
>>>>>> signaling
>>>>>>         plane
>>>>>>         and media plane messages and processes that enable two or 
>>>>>> more
>>>>>>         participants to communicate. I think session is a larger 
>>>>>> scope than
>>>>>>         dialog. In another word, one session can contain more than 
>>>>>> one
>>>>>>         dialog.
>>>>>>         Is what I understand right?
>>>>>>
>>>>>>         Zongjun
>>>>>>
>>>>>>
>>>>>>         2008/4/24, Vijay K. Gurbani <[email-masked]
>>>>>>         <mailto:[email-masked]>>:
>>>>>>          > There is some work progressing in the BMWG WG to create
>>>>>>         performance
>>>>>>          >  metrics around SIP.  One of the first tasks in such an 
>>>>>> endeavor
>>>>>>          >  is to define the notion of dialogs and sessions.  Please 
>>>>>> see
>>>>>>          >  Section 3.1.1 of
>>>>>>          >
>>>>>>
>>>>>> https://svn.resiprocate.org/rep/ietf-drafts/gurbani/bmwg-sip-bench-term/draft-ietf-bmwg-sip-term-00.txt
>>>>>>          >  of the above draft for some insight.
>>>>>>          >
>>>>>>          >  Ëï×Ú¾ý wrote:
>>>>>>          >
>>>>>>          > > Hi, Lincoln
>>>>>>          > >
>>>>>>          > > thanks for your instructions.
>>>>>>          > >
>>>>>>          > > I know that dialog can exist without session since
>>>>>>         SUBSCRIBE/REFER can
>>>>>>          > > create dialog and without any media between 
>>>>>> communication
>>>>>>         peers.
>>>>>>          > >
>>>>>>          > > What I want to know is the relationship of dialog and
>>>>>>         session when
>>>>>>          > > they both exist in one communication activity. Take a
>>>>>>         example, when
>>>>>>          > > there are 2 person participating talks with voice, we 
>>>>>> say
>>>>>>         there is a
>>>>>>          > > dialog and a session.
>>>>>>          > >
>>>>>>          > > But when one caller invites another callee and gets five
>>>>>>         200 final
>>>>>>          > > responses from 5 UA every of which has its own session
>>>>>>         description. We
>>>>>>          > > can say that there are 5 dialogs between caller and the 
>>>>>> other 5
>>>>>>          > > callees, right? And then what is the exact number of
>>>>>>         session in this
>>>>>>          > > scenario? One session or five session? That is what I 
>>>>>> want
>>>>>>         to know.
>>>>>>          > >
>>>>>>          > > Dialog is determined by dialogID (call-id, from/to tag) 
>>>>>> and
>>>>>>         session id
>>>>>>          > > is determined by session id given in the SDP message. 
>>>>>> My
>>>>>>         answer is
>>>>>>          > > there are 5 dialog and one session now, right?
>>>>>>          > >
>>>>>>          >
>>>>>>          >  - vijay
>>>>>>          >  --
>>>>>>          >  Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
>>>>>>          >  2701 Lucent Lane, Rm. 9F-546, Lisle, Illinois 60532 (USA)
>>>>>>          >  Email: vkg@{alcatel-lucent.com
>>>>>>         <http://alcatel-lucent.com/>,bell-labs.com
>>>>>>         <http://bell-labs.com/>,acm.org <http://acm.org/>}
>>>>>>          >  WWW:   http://www.alcatel-lucent.com/bell-labs
>>>>>>          >
>>>>>>         _______________________________________________
>>>>>>         Sip mailing list  https://www.ietf.org/mailman/listinfo/sip
>>>>>>         This list is for NEW development of the core SIP Protocol
>>>>>>         Use [email-masked]
>>>>>>         <mailto:[email-masked]> for questions on
>>>>>>         current sip
>>>>>>         Use [email-masked] <mailto:[email-masked]> for new
>>>>>>         developments on the application of sip
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>     --     BR
>>>>>>     Donald _______________________________________________
>>>>>>     This is the SIP Forum discussion mailing list
>>>>>>     TO UNSUBSCRIBE, or edit your delivery options, please visit
>>>>>>     http://sipforum.org/mailman/listinfo/discussion
>>>>>>     Post to the list at [email-masked]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Gaurav Katiyar
>>>>>> Induslogic india pvt. ltd
>>>>>> B-34/1 sector 59 NOIDA
>>>>>> Phone:9818381368
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. 
>>>>>> Try
>>>>>> it now.
>>>>>> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>>>>>>  >
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Sip mailing list  https://www.ietf.org/mailman/listinfo/sip
>>>>>> This list is for NEW development of the core SIP Protocol
>>>>>> Use [email-masked] for questions on current sip
>>>>>> Use [email-masked] for new developments on the application of sip
>>>>>
>>>>
>>>>
>>>> --------------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>>
>>>>> _______________________________________________
>>>>> Sip mailing list  https://www.ietf.org/mailman/listinfo/sip
>>>>> This list is for NEW development of the core SIP Protocol
>>>>> Use [email-masked] for questions on current sip
>>>>> Use [email-masked] for new developments on the application of sip
>>>>>
>>>>
>> 

_______________________________________________
Sip mailing list  https://www.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Paul Kyzivat <[email-masked]>
Date: Thu, 01 May 2008 08:13:00 -0400

Mahesh Anjanappa wrote:
>>>> particular use cases. Will you explain to me how your definition 
>>>> relates to the use case with A/B/C/D that I gave?
>>>
>>> OK,let me see.
>> The SDP negotiated between B and C contains only audio. (B didn't 
>> offer the video to C.)
>>
>> The SDP negotiated between B and D contains only video. (B didn't 
>> offer the video to D.)
>>
>> The purpose of B is to consolidate an audio-only device and a 
>> video-only device into what seems, to A, like one audio/video device.
> 
> are not aware of each other. All they do, is have their individual 
> contract with

OK, we are closer to agreement.

Note that in a regular conference, a participant may or may not know it 
is in a conference. If not, then it thinks it is in a session with the 
focus.

>> They don't all have the same contract. So by your definition I don't 
>> think they can all have one session.
>>
>> hard to find any tangible item that they all have that refers to a 
>> single session. In the end, from the point of view of B it may indeed 
>> be one session. But A, C, and D can't perceive that.
>>
>> conference id, then I guess you could say that the conference id was 
>> an identifier for the "session".
>>
>> But if B was purpose-built for this particular functionality, and 
>> there is no conference id, then what?
> 

So, is there one session, three, or four? Does it matter?

>> And in a simple call between A and C there would be no conference id, 
>> so something else must serve as the "session" identifier. But in that 
>> case, it would seem that these aren't the *same* notion of session.
>>
>> You asked why I didn't think it was important to define session. I 
>> will admit that it seems odd to have a Session Initiation Protocol 
>> without a clear idea of what this "session" is that it is initiating. 
>> So it indeed would be *nice* to have a definition that covers all the 
>> cases.
>>

Do you mean that you think there are things people are doing that they 
shouldn't be doing, and wouldn't be doing if there was a better 
definition of session?

>> From a practical perspective I think the thing that is being initiated 
>> by SIP is the contract established by a matching offer/answer. That is 
>> fairly straightforward when the UAC and UAS are the offerer and 
>> answerer, or visa versa. It gets messy when other UAs are involved in 
>> the construction of the offer and the answer. And in those cases it 
>> gets really hard to figure out what the session is, because not all 
>> the parties will agree.
> 

I guess possibly it might be helpful to more carefully define the term 
"session" as used in sip. But I think only to *narrow* its scope so that 
people don't read too much into it. But I see no urgency to that.

	Paul

>>>>> Subject: Re: [Sip] [SIPForum-discussion] What's the difference 
>>>>> between session and dialog in SIP?
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> gaurav katiyar wrote:
>>>>>>> Sip "Session Initiation Protocol". It talks about media session, 
>>>>>>> i mean
>>>>>>> right node and body (SDP) handles media session if present. 
>>>>>>> Dialogs may
>>>>>> But then in sip it takes a pair of SDPs to establish a call. Is 
>>>>>> that one
>>>>>> together describe one session, regardless of how many media 
>>>>>> streams. But
>>>>>> Here B is a B2BUA and media relay as in your example, but one 
>>>>>> stream is
>>>>>>>         dialog. In another word, one session can contain more 
>>>>>>> than one
>>>>>>>         dialog.
>>>>>>>          >  metrics around SIP.  One of the first tasks in such 
>>>>>>> an endeavor
>>>>>>>          >  is to define the notion of dialogs and sessions.  
>>>>>>> Please see
>>>>>>>          >  Section 3.1.1 of
>>>>>>>          >
>>>>>>>
>>>>>>>          > > there are 2 person participating talks with voice, 
>>>>>>> we say
>>>>>>>         there is a
>>>>>>>          > > dialog and a session.
>>>>>>>          > >
>>>>>>>          > > can say that there are 5 dialogs between caller and 
>>>>>>> the other 5
>>>>>>>          > > scenario? One session or five session? That is what 
>>>>>>> I want
>>>>>>>         to know.
>>>>>>>          > >
>>>>>>>          > > Dialog is determined by dialogID (call-id, from/to 
>>>>>>> tag) and
>>>>>>>         session id
>>>>>>>          > > is determined by session id given in the SDP 
>>>>>>> message. My
>>>>>>>         answer is
>>>>>>> Be a better friend, newshound, and know-it-all with Yahoo! 
>>>>>>> Mobile. Try
>>>>>>> it now.

---

From: Mahesh Anjanappa <[email-masked]>
Date: Fri, 02 May 2008 10:23:51 +0530

> Note that in a regular conference, a participant may or may not know it is 
> in a conference. If not, then it thinks it is in a session with the focus.

The Participant can be ignorant of the Conference, but that is only by 
choice
and not because the framework doesnt allow the Pariticpant to know it.
What i mean is that the Participant still is part of the same 
Contract(single
session or confernce) but just chooses not to see it. So i feel my defintion 
of
the *Session* stands good (survives:-) ) this  scenario.

>>> single session. In the end, from the point of view of B it may indeed be 
>>> one session. But A, C, and D can't perceive that.
>>>
>>> But if B was purpose-built for this particular functionality, and there 
>>> is no conference id, then what?
>>
> shouldn't be doing, and wouldn't be doing if there was a better definition 
> of session?

Well, i dont have enough data to state that "there are things people are
doing that they shouldnt be doing", but i can definitely say that by not 
providing
a definition for Session it is gives huge room for different perceptions and
hence for different incorrent usages which later on will come to dog IETF
discussion rooms when implementors get into trouble.

My main requirement for a definition is that it shall serve as a base 
principle
whenever a designer gets into a situation and wants to make a decision
as to which is the right way while designing some SIP based mechanism.
Let me give an example:
Consider design of a Rich Chat Application which provides for Text Chat
as well as Video share.
The Application CAN have two SIP dialogs, one for realising Text Mesaging
session/contract and another for Video sharing session/contract.
Lets assume for  a moment that the concept of session is non-existent
because it hasnt been concretely defined.
Now if a "is typing" kind of signal information has to be sent to the 
remote, a
Designer can argue that it can be sent on either of the two dialogs because
both are between the same Application/UA and there is no other basis to
discrimnate the two to favour one over the other.
But instead if we DID have a defintion for Session, the designer would refer 
to the
base principle of Session and decide to send it over the dialog being used 
for the
Text Messaging Session.

>>> the construction of the offer and the answer. And in those cases it gets 
>>> really hard to figure out what the session is, because not all the 
>>> parties will agree.
>>

:-) :-), Paul when would you see the urgency for it ? :-) probably until 
then
we can defer the discussion :-):-)

---

From: Al Morton <[email-masked]>
Date: Wed, 30 Apr 2008 09:37:02 -0400

At 09:05 AM 4/30/2008, Paul Kyzivat wrote:
>Its a decent try. As I mentioned in a prior reply, IMO there is no 
>real need to define this.

And with this message, I'm removing [email-masked] from this thread.

Al Morton
bmwg chair

---

From: gaurav katiyar <[email-masked]>
Date: Tue, 29 Apr 2008 23:23:49 -0700 (PDT)

Hi,
     I am getting confused now. what session exactly is ? Why ACK is an end to end request for 200 OK of INVITE request? does it relate to session any where ??? :-). Is it right to generate ACK locally by any proxy including B2BUA for 200 OK of initial INVITE request? 
   
  Gaurav

Mahesh Anjanappa <[email-masked]> wrote:
  I'm surprised to see that a fundamental concept "SIP Session" does not have
a clear definition documented anywhere. I was eagerly waiting for a IETF 
Guru
to clarify this. I wish somebody writes a draft clarifying all the 
undocumented
fundamental concepts in SIP. If i knew it all, i would have done it :-)

My 2 cents on it.
A Session is a Rendezvous Contract between 2 or more UA's for communnicating
with some modality. SIP dialog is a context over which such a Contract is 
negotiated
decided, and upheld.
Normally the SDP Session Id should identify the Contract/Session. But not 
necessarily
always. If its a multiparty the Conference ID would serve such a purpose.
I can get into a session with a non-INVITE dialog as well. Example: 
SUBSCRIBE to
a specialized Event package. In this case some Identifier in the Event 
package probably will
serve as the Session Id.
As you can see there can be more than 1 dialog related a Session.
But there is no documentation saying what exactly threads all the dialogs to 
a Session except
the mentioning of a ID in the SDP RFC to identify the session being 
described in a SDP.

My understanding is that a Session Identifier can take the form of 
Conference ID or any
other depending on the method used to setup the rendezvoud/session.

Well, the above is my understanding of it, not based on any existing draft 
or RFC, so i welcome
whatever corrections need be.

regards
Mahesh

----- Original Message ----- 
From: "Paul Kyzivat" 

To: "gaurav katiyar" 
Cc: ; ; 

>
>
> gaurav katiyar wrote:
>> Sip "Session Initiation Protocol". It talks about media session, i mean
>> sort of context (like caller, callee, location, routing etc.) to modify
>> right node and body (SDP) handles media session if present. Dialogs may
> advertised via SAP, there could be many participants in the same session.
>
> But then in sip it takes a pair of SDPs to establish a call. Is that one
> together describe one session, regardless of how many media streams. But
> Here B is a B2BUA and media relay as in your example, but one stream is
>> */Donald Lee /* wrote:
>> On Fri, Apr 25, 2008 at 8:18 AM, å&shy;™å®—å› >> > wrote:
>>
>> Hi, Vijay
>>
>> From this specification, session is a combination of signaling
>> plane
>> and media plane messages and processes that enable two or more
>> participants to communicate. I think session is a larger scope 
>> than
>> dialog. In another word, one session can contain more than one
>> dialog.
>> 2008/4/24, Vijay K. Gurbani >> >:
>> > is to define the notion of dialogs and sessions. Please see
>> > Section 3.1.1 of
>> >
>> 
>> > Ã‹Ã¯Ã—ÃšÂ¾Ã½ wrote:
>> > > create dialog and without any media between communication
>> peers.
>> > >
>> > > there are 2 person participating talks with voice, we say
>> there is a
>> > > dialog and a session.
>> > >
>> > > scenario? One session or five session? That is what I want
>> to know.
>> > >
>> > > Dialog is determined by dialogID (call-id, from/to tag) and
>> session id
>> > > is determined by session id given in the SDP message. My
>> answer is
>> ,bell-labs.com
>> ,acm.org }
>> for questions on
>> BR
>> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
>> it now.
>> >> >
>>
>>

Gaurav Katiyar

---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.