Subject: [Sip] Dialog usage: Forking impacts

From: "Christer Holmberg \(JO/LMF\)" <[email-masked]>
Date: Fri, 3 Mar 2006 12:37:22 +0100

Hi,

Another scenario related to the dialog usage issue:

1.	UA_1 sends an INVITE, which gets forked to UA_2 and UA_3. 

2.	UA_2 establish an early dialog with UA_1 and sends a SUBSCRIBE
(or any other request establishing a new dialog usage) to UA_1,
establishing a dialog usage (subscribe dialog usage in case of
SUBSCRIBE).

3.	UA_3 acceptes the session for the INVITE and sends 200 OK
(INVITE)

4.	The forking proxy sends a CANCEL to UA_2, and forwards the 200
OK (INVITE) to UA_1.

5.	UA_1, when receiving the 200 OK, would normally terminate the
early dialog between itself and UA_2. BUT, in this case it can't do it,
because it still has an active subscription dialog usage association
with UA_2, and the CANCEL sent by the proxy didn't terminate that dialog
usage in UA_2 either.

Now, the dialog usages still share the same dialog, but from the UA_1
perspective each dialog usage has DIFFERENT route sets and remote
targets...

Saying that dialog re-usage is only allowed for FULLY ESTABLISHED
dialogs would of course solve this, but currentely I think it's legal
from a pure SIP perspective. Or?

Regards,

Christer

_______________________________________________
Sip mailing list  https://www1.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: Robert Sparks <[email-masked]>
Date: Fri, 3 Mar 2006 09:16:02 -0600

inline

On Mar 3, 2006, at 5:37 AM, Christer Holmberg ((JO/LMF)) wrote:

> 2.      UA_2 establish an early dialog with UA_1 and sends a  
> SUBSCRIBE (or any other request establishing a new dialog usage) to  
> UA_1, establishing a dialog usage (subscribe dialog usage in case  
> of SUBSCRIBE).
>
> 4.      The forking proxy sends a CANCEL to UA_2, and forwards the  
> 200 OK (INVITE) to UA_1.
>
> 5.      UA_1, when receiving the 200 OK, would normally terminate  
> the early dialog between itself and UA_2. BUT, in this case it  
> can't do it, because it still has an active subscription dialog  
> usage association with UA_2, and the CANCEL sent by the proxy  
> didn't terminate that dialog usage in UA_2 either.
>
> Now, the dialog usages still share the same dialog, but from the  
> UA_1 perspective each dialog usage has DIFFERENT route sets and  
> remote targets...
UA_1 and UA_2 have a different dialog than  UA_1 and UA_3.
The to-tags returned by 2 and 3 will be different. It is normal that the
route sets and remote targets for these different dialogs will be  
different.

the 1-2 dialog has two usages before the cancel (and early session  
usage, and a subscribe). After the cancel
it has one usage (the subscription).

The 1-3 dialog has only one usage in its existence.

> dialogs would of course solve this, but currentely I think it's  
> legal from a pure SIP perspective. Or?
I don't see anything special here about early vs confirmed early- 
session usages wrt dialog reuse.

But I will point out that I'd be _really_ surprised if more than a  
trivial number of implementations
did the right thing with the subscription above.

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 03 Mar 2006 10:25:36 -0500

Christer Holmberg (JO/LMF) wrote:
> establishing a dialog usage (subscribe dialog usage in case of SUBSCRIBE).
> 
> 3.      UA_3 acceptes the session for the INVITE and sends 200 OK (INVITE)
> 

This does point up some issues with language in the RFCs. I doubt there 
really is any such thing as an "early dialog". In reality there is only 
one kind of dialog, but there is an "early invite dialog usage".

> perspective each dialog usage has DIFFERENT route sets and remote targets...

Don't think I agree. Following step 3, or maybe sooner, UA1 knows there 
are two dialogs, because it has received responses with different 
to-tags. The early invite dialog usage with UA2 and the subscribe from 
UA2 share one dialog, and the invite dialog usage with UA3 uses the 
other dialog.

There isn't anything new here due to sharing. UA2 and UA3 could have 
both established early invite dialog usages. UA1 has to deal with two 
dialogs in that case as well.

The key thing in all this is that the lifetime of dialogs is not 
explicitly managed. Rather it is reference counted based on the usages 
that share it.

> from a pure SIP perspective. Or?

This is one of the reasons why I think it is a bad idea to start putting 
restrictions on the use of shared dialogs. As things stand, the whole 
ediface does tie together using just a few basic principles. If you 
support those principles, then all the different possible combinations 
of usages will work. If you impose restrictions on the kinds of usages 
that are allowed, you encourage implementations that implement all sorts 
of special case logic. Figuring out what special case logic is 
sufficient is harder than implementing the general case.

	Paul

---

From: Xiao Wang <[email-masked]>
Date: Wed, 08 Mar 2006 11:23:02 +0800

I think that reuse early dialog may be risk. Because SUBSCRIBE may arrive at
UA1 before 1xx or 2xx for the reason of net delay or lose, so UA1 doesn't
find out a match dialog for SUBSCRIBE, finally the SUBSCRIBE will be
dropped, and return 400. 

Xiao

> -----Original Message-----
> From: Paul Kyzivat [mailto:[email-masked]]
> Sent: Friday, March 03, 2006 11:26 PM
> To: Christer Holmberg (JO/LMF)
> Cc: IETF SIP List
> Subject: [Sip] Re: Dialog usage: Forking impacts
> 
> 
> 
SUBSCRIBE).
(INVITE)
targets...

---

From: Paul Kyzivat <[email-masked]>
Date: Wed, 08 Mar 2006 11:35:03 -0500

> find out a match dialog for SUBSCRIBE, finally the SUBSCRIBE will be

If UA2 sends an *confirmed* 1xx to establish the early dialog, and then 
sends the subscribe after receiving confirmation (via prack) then there 
is no risk.

If UA2 sends an *unconfirmed* 1xx and then sends a subscribe within the 
dialog, there is risk that UA1 won't know about the dialog. In that case 
UA1 should be sending a 481 response, and UA2 will know what happened. 
There should be no dropping of the subscribe.

	Paul

---

From: Xiao Wang <[email-masked]>
Date: Fri, 10 Mar 2006 14:54:31 +0800

Inline

Xiao
> Sent: Thursday, March 09, 2006 12:35 AM
> To: Xiao Wang
> Cc: [email-masked]; [email-masked]
> Subject: Re: [Sip] Re: Dialog usage: Forking impacts
> 
> 
> 
> Xiao Wang wrote:
> > I think that reuse early dialog may be risk. Because SUBSCRIBE may
arrive
> at
[Xiao]Right. 

> There should be no dropping of the subscribe.
[Xiao]Oh, my meaning is SUBSCRIBE request will be failure.