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

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 17 May 2001 11:43:32 -0400

> -----Original Message-----
> From: Shail Bhatnagar [mailto:[email-masked]]
> Sent: Friday, April 27, 2001 5:35 PM
> To: Jonathan Rosenberg
> Cc: [email-masked]'
> Subject: Re: [SIP] precedence rules for Route, maddr, and 
> R-URI hostname
> 
> 
> 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 ?

ACK for 200 OK is treated no different from a re-INVITE or BYE as far as
Route processing goes. So, if the UA has no DNS and always sends all
requests to its local outbound proxy without even glancing at the route set,
it would send the entire route set in Route headers. If the UA uses the top
Route header, it would pop it into the R-URI and then send the rest in the
Route headers in the ACK.

> 
> 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.

If I'm using a local outbound proxy for an initial request, and I don't
strip the maddr which identifies that proxy.

Ranjit wrote:
> 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.

Egads, no! We are not going to define special case processing for how a
proxy gets Route headers.

-Jonathan R.

---
Jonathan D. Rosenberg, Ph.D.                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

> 
> 
> Jonathan Rosenberg wrote:
> > 
> > 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.
> 

_______________________________________________
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: Shail Bhatnagar <[email-masked]>
Date: Thu, 17 May 2001 13:03:04 -0400

Jonathan, Thanks for you response. Please see some inline
comments.

Shail

> Route headers in the ACK.

Does this mean that if the local outbound proxy did a record-route
on the INVITE, the topmost Route header in the route list would
actually belong to the local outbound proxy and it will have to pop
it and actually use the second route entry for forwarding the ACK
further ??

> strip the maddr which identifies that proxy.

Are you saying that a client in domain "xyz.com", when calling
sip:[email-masked], can do either of the following :

INVITE sip:[email-masked] SIP/2.0

or

INVITE sip:[email-masked];maddr=proxy.xyz.com SIP/2.0

Thanks,
Shail

---

From: "Connie Blanchard" <[email-masked]>
Date: Thu, 24 May 2001 10:44:18 -0400

Section 1.35.1 Record-Route Operation says:
	The Record-Route header field contains a globally reachable SIP-URI that
identifies the proxy server,
	including an address parameter (maddr) that identifies its location. Each
such proxy server adds the
	Request-URI of the incoming request to the beginning of the list.

What if the Request-URI of the incoming request does not match a host on the
proxy server?

What should a proxy do if the R-URI that it receives is a Tel URL (which it
understands) but wants to add a Record-Route header? Should it convert it to
SIP-URI? and if so, what does it use as the host for this SIP-URI?