Subject: SIP: CANCEL method/forking proxy

From: Jerome Privat <[email-masked]>
Date: Wed, 29 Jul 1998 21:09:54 +0100

I'd like to be sure that I understand why BYE cannot be used to cancel
pending searches (in other terms: why do we need to use CANCEL?).

In section 4.2.5, it is written:
"The BYE request cannot be used to cancel branches of a parallel search,
since several branches may, through intermediate proxies, find the same
user agent and terminate the call."

First of all, in the example of section 14.5 Forking Proxy, it seems to
me that we could send a:
BYE sip:[email-masked] SIP/2.0
(instead of CANCEL sip:[email-masked] SIP/2.0).

If my understanding is correct, we need a more complex example to
justify the use of CANCEL.
Let's consider the following example (with 2 levels of forking proxies
and a UAS registered with 2 different proxies):
a forking proxy P forks a request to proxies P1 and P2.
P1 forks the request to UAS1 and UAS2.
P2 forks the request to UAS1 and UAS3.

UAS1 ([email-masked]) sends a 200 OK to P1 and P2.
P1 and P2 both proxies this 200 OK to P.

Now, P wants to accept only one of this two 200 OK. So when it receives
the first 200 OK (say the one from P1), it sends:
ACK sip:[email-masked] SIP/2.0
to P1 which proxies it to UAS1.
But then, when it receives the second 200 OK from UAS1 (via P2), it
sends:
CANCEL sip:[email-masked] SIP/2.0 
to P2 which proxies it to UAS1.
(In this case, we cannot send a:
BYE sip:[email-masked] SIP/2.0
because this would terminate the call).

Is my understanding correct?
If yes, I think you should include a more comprehensive example (as the
one above) in the spec to justify the use of CANCEL.
If not, please explain me where is my mistake.

Thanks,

Jerome

Jerome Privat
BT Labs
email: [email-masked]

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 30 Jul 1998 01:58:01 -0400

> justify the use of CANCEL.

No, this example is fine. When P sends the CANCEL, it doesn't know if
the next hop (sip:[email-masked]) is a proxy (likely it is, in fact), or
a UAS. If it was a proxy, the CANCEL would have been further proxied.
So, if Watson had also registered sip:[email-masked] with the ACM
proxy, the CANCEL would arrive to Y as well. This is fine, since a
CANCEL does not terminate a call which has already been answered with a
200. Now, had P sent a BYE instead, the BYE would have hit Y and
terminated the call unintentionally.

-Jonathan R.
-- 
Jonathan D. Rosenberg                       Lucent Technologies
Member of Technical Staff                   101 Crawfords Corner Rd.
High Speed Networks Research                Holmdel, NJ 07733
FAX: (732) 834-5379                         Rm. 4C-526
EMAIL: [email-masked]
URL: http://www.cs.columbia.edu/~jdrosen