Subject: URI comparison usage

From: Shail Bhatnagar <[email-masked]>
Date: Mon, 28 Feb 2000 01:13:53 -0500 (EST)

The question about URL comparison rules has come up a number of times in the
past and I think rules have been defined. My question is from a proxy
server standpoint. Why can't a 
SIP proxy server simply do a strcmp() for the From header and probably
a strcmp() for the addr-spec portion of the To header ?? Why would any 
proxy or user agent do anything with the From or To header except appending
a tag to the To ? IS it really necessary for the proxy to parse the input 
From/To and compare against parsed form of the From/To stored in the fast 
lookup data structure ??

Also, my guess is that the following 
    sip:[email-masked];tag=1234-ABC

is not a valid To header since tag could be a user-defined parameter in
the SIP-URL rather than a addr-param. Is it said somewhere in the spec or 
I am missing something ? 

Thanks,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 28 Feb 2000 02:15:07 -0500

> From/To and compare against parsed form of the From/To stored in the fast

I think so. User agents might do things like re-order parameters, for
example. Since they must parse these headers completely, its not
desirable for them to have to remember the details of the LWS and
parameter ordering present in the field before it was parsed.

> the SIP-URL rather than a addr-param. Is it said somewhere in the spec or

No, this is valid. If, for some reason, someone defines a SIP URL
parameter called tag, the To field would have been:

To: <sip:[email-masked];tag=1234-ABC>;tag=1122

Where the real To tag is 1122.

Remember, if the URL contains a semicolon (which means it has a
parameter), it must be enclosed in angle brackets. Thus, if there are
angle brackets, tag is outside of it. If there are no angle brackets,
there are no URL parameters.

-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: Tue, 29 Feb 2000 16:14:20 -0500

Jonathan, Thanks for your response. I will not argue for strcmp of name-addr
but I will say that why would a SIP ua or proxy alter the name-addr portion of 
From/To. The name-addr in From/To is supposed to remain unchanged for the call.
It makes sense for any implementation of SIP to simply keep the name-addr of
From/To as it came in the first time instead of keeping it in parsed form
and generating the unparsed form from it.

Shail.

-- 
Best regards,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 29 Feb 2000 17:54:53 -0500

> and generating the unparsed form from it.

Proxies and uas will likely need to parse these in order to provide
features. For example, call screening will require a server to parse the
>From field. I suspect most proxies will parse, at least, To, From,
Call-ID, CSeq and Via. Once parsed, you don't want to also have to
remember the original unparsed version. When you reconstruct the URI,
case or something like this might not be the same.

-Jonathan R.