Subject: More questions about proxy behavior

From: Shail Bhatnagar <[email-masked]>
Date: Tue, 07 Dec 1999 17:24:55 -0500

Some questions about a transaction stateful forking proxy.
Here are some scenarios :

1) It forks and sends an INVITE to 2 branches. Receives 2 300
responeses. Should it try all of the Contacts.

2) It forks and sends an INVITE to 2 branches. Gets a 200 OK on 
branch 1, sends CANCEL on branch 2 and then gets a 200 OK for original
INVITE on branch 2. ( CANCEL and 200 probably passed each other on
the wire as discussed in the bug list of RFC2543) Should it forward this
200 upstream ?

3) How long should a stateful forking proxy maintain state on 
branches which responded with a response that was dropped due to being
inferior to some other branch's response ?

-- 
Best regards,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 07 Dec 1999 18:51:39 -0500

> responeses. Should it try all of the Contacts.

Its implementation dependent. The caller preferences spec will allow a
user to ask for recursion or not, but its more of a suggestion than a
mandatory specification of behavior. Certain services that a proxy
provides will require recursion, and others won't.

> the wire as discussed in the bug list of RFC2543) Should it forward this

Absolutely.

> inferior to some other branch's response ?

Well, you should still ACK those branches, not actually just "drop"
them. How long to maintain state for those branches is the same as how
long you maintain state in the case of no forking. You should keep state
for around 30 seconds after the final response. This should cover the
time for all final responses which may have been sent, so that you can
ACK them.

-Jonathan R.
-- 
Jonathan D. Rosenberg                       200 Executive Drive
Chief Scientist                             Suite 120 
dynamicsoft                                 West Orange, NJ 07052
[email-masked]                     FAX:   (732) 741-4778
http://www.cs.columbia.edu/~jdrosen         PHONE: (732) 741-7244
http://www.dynamicsoft.com

---

From: Shail Bhatnagar <[email-masked]>
Date: Wed, 08 Dec 1999 11:09:11 -0500

> > the wire as discussed in the bug list of RFC2543) Should it forward this

<Jonathan> Absolutely.

Jonathan, On a slightly different note, how should a forking proxy
handle a CANCEL (sent by the client), when some branches are pending and
some branches returned a final response. I mean should it still forward
the best final response ?

Thanks,
Shail

---

From: Shail Bhatnagar <[email-masked]>
Date: Wed, 08 Dec 1999 10:02:04 -0500

> provides will require recursion, and others won't.

Jonathan, Let us assume that the proxy is a forking recursive proxy.
I am saying what should it do with multiple 300 responses and 300
is the best response class you have received.
Thanks for the answers.

Regards,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 08 Dec 1999 12:59:55 -0500

> the best final response ?

Generally, yes. The process is as follows:

1. THe proxy receives a CANCEL, and responds with 200 OK.
2. The proxy forwards the CANCEL on all pending branches.
3. The proxy waits for either (1) a final response to the original
request, or (2) a response to the CANCEL.
4. For each pending branch that responded to the CANCEL, wait a small
timeout (some small number of seconds) in case they had a final response
on the wire before receiving the CANCEL. In the next version of SIP, the
UA will have to send a final response to the original request, so you
generally won't need to wait.
5. of course, ACK any non-200 final responses you get.
6. return the best response to the request.

Step 6 is sort of optional for non-200. In rfc2543, the UA won't expect
a final response to the original request, so if you don't send it, its
OK. But, since the CANCEL and final response to the original request may
pass on the wire, the UAC needs to be prepared to get a final response
even after sending a CANCEL. 

Thanks,
Jonathan R.

---

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 08 Dec 1999 13:01:02 -0500

> is the best response class you have received.

Same answer. It can recurse on all of them, recurse on some of them, or
return one of them. You generally shouldn't return a 300 response you
already recursed on, though.

-Jonathan R.