Subject: [SIP] precedence rules for Route, maddr, and R-URI hostname

From: Jonathan Rosenberg <[email-masked]>
Date: Wed, 25 Apr 2001 16:08:29 -0400

Folks,

We need to finally come to conclusion on this nagging problem of the
precedence rules for the Route header, R-URI maddr, and R-URI hostname.
Specifically, when a proxy receives a request, what is the processing it
uses to determine how to route it? The issue is linked with a bunch of very
related ones, such as how we handle local-outbound proxies for hosts that
have no DNS.

Like any problem, we need some requirements for this solution:

1. a proxy should not need to know that it is a local-outbound proxy for the
upstream element (which can be a UA or proxy), for this to work
2. Ideally, a subsequent request in a call should follow the path of proxies
which record routed.
3. the solution should work correctly in the face of spirals

To proceed, I am going to make a strawman. Lets work from this, and proceed
by having people point out issues or problems with this solution, rather
than proposing completely new ones.

Strawman
--------

when a proxy receives a request, it checks for the existence of a Route
header. If one exists, that Route header is popped, and placed into the
request URI. It is then sent using the procedures of draft-ietf-sip-srv. If
no route header is present, the proxy examines the request URI. If it
contains an maddr, and this maddr is not an interface that the proxy is
listening on, the proxy forwards the request using the procedures of
draft-ietf-sip-srv on the request URI (this will cause it to be forwarded to
the address in the maddr). If the maddr is present, but is an interface the
proxy is listening on, the maddr is stripped, and processing proceeds as if
it were never there. If there was no maddr, and the domain of the request
URI is not a domain the proxy is managing, the procedures of
draft-ietf-sip-srv are used to forward the request to that URI. If the
domain is one the proxy is managing, the request is processed.

Consider a UA which uses a pre-configured local outbound proxy. It sends an
INVITE, and then wishes to send a request for the same call leg. If it has
obtained a route set for this call leg, it SHOULD pop the top route entry,
place it into the request URI, and use that to forward the request. If the
proxy is not DNS capable, it MAY alternatively place the entire route set
into Route headers (not popping the top URI). It sets the request URI to the
same value it used for the initial INVITE, and sends it to its local
outbound proxy.

One more thing we would need for this to work. The URI placed into the RR
header MUST be unique for each unique request URI in the incoming request,
but must not equal the URI of the incoming request (adding an maddr is fine,
for example. So, the current normal behavior of copying the R-URI userhost
into RR, and adding your own port and maddr, meets the requirement). The
important implication of this is that when a proxy record-routes through a
spiral, the URI in the RR needs to be different each time through the
spiral.

This approach solves all of the problems that have been pointed out, I
think:

1. Lets say proxy X is a local outbound proxy for some UA Y, and Y doesn't
do DNS. So, when X sends a re-INVITE, it doesn't pop the top route header.
This request shows up at X. Since there is a Route header, X pops it, and
forwards it there. Of course, thats back to itself. However, this is a
SPIRAL, since the incoming request URI is guaranteed not to be the same as
the URI in the top Route. So, it looks at the request again, and if there is
a Route, sends it on its way. Of course, a smart proxy could simply notice
this condition and not actually send it to itself.

2. When using Route headers through a spiral, the request URI at each point
in the spiral is guaranteed to be just as unique as the original request was
through the set of proxies. This means that if the origina R-URI was
different when received twice at the same proxy, the R-URI from Route will
be different two. So, the case that Robert raised, where the requests will
appear as loops, won't happen.

Comments?

-Jonathan R.

---
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
This list is for continuing development of the SIP protocol.
The sip-implementor's list is the place to discuss implementation,
and to receive advice on understanding existing sip.
To subscribe to it, send mail to 
[email-masked] with "subscribe" in the body.

---

From: "Brett Tate" <[email-masked]>
Date: Thu, 26 Apr 2001 22:30:07 -0400

Jonathan,

I have not noticed any flaws with the strawman. 

However I assume that only the SIP-URL 
of the Route instead of the whole Route 
contents are copied into the Request-URI.

Route = "Route" ":" 1# (name-addr *(";" rr-param))
 and
Request-URI = SIP-URL | absoluteURI

I mention this for clarity purposes and 
because it was discussed in your earlier 
"new record-route text" proposal.  That
proposal's example also only showed the SIP-URL
getting copied into the Route instead of the 
whole name-addr and the rr-param.  Is this
still the recommendation?

> request URI.

<snip>

---

From: Shail Bhatnagar <[email-masked]>
Date: Fri, 27 Apr 2001 17:35:22 -0400

Jonathan,  One question related to
this description. If a user agent
is configured to use its local outbound
proxy, does it send entire Route list
(formed from Record-Route and Contact
in 200) to its proxy in the ACK ?
Or is the user agent supposed to use
the Route list (and pop topmost entry), 
once the signaling path is established ?

Also, I am trying to think when
would a proxy receive a request
without Route header, maddr of
req-uri is proxy but host portion of
req-uri is not proxy.

Thanks,
Shail

---

From: "Ranjit Avasarala" <[email-masked]>
Date: Fri, 27 Apr 2001 16:52:20 -0500

Hi
     I think if a user agent is configured to its local proxy then need not
send the entire route list to proxy in ACK,, be'se the proxy would
know the route....thru Record-Route header.

Regards
Ranjit
Mascon Communication Technologies
http://www.masconit.com

----- Original Message -----
From: Shail Bhatnagar <[email-masked]>
To: Jonathan Rosenberg <[email-masked]>
Cc: <[email-masked]>
Sent: Friday, April 27, 2001 4:35 PM
Subject: Re: [SIP] precedence rules for Route, maddr, and R-URI hostname

Thanks,
Shail

---

From: Shail Bhatnagar <[email-masked]>
Date: Fri, 27 Apr 2001 20:03:06 -0400

Are you saying that ACK will
identify the INVITE transaction and
proxy will route the ACK based on
transaction state/next hop ?
That would require the Request-uri
if ACK to be same as INVITE.