Subject: [SIP] confusion in url comparison

From: Juha Heinanen <[email-masked]>
Date: Mon, 26 Feb 2001 15:07:25 +0200

there is an uncertainty between some vendors if the two sip urls

sip:[email-masked]
sip:[email-masked];user=phone

should be considered to match, when the urls appear in to or from
fields.

according to the text of section 2.1 they seem to match, since it says

o user or telephone-subscriber, password, host, port and any url-parameter
  parameters of the URI must match. If a component is omitted, it matches
  based on its default value. (For example, otherwise equivalent URLs
  without a port specification and with port 5060 match.) Components not
  found in both URLs being compared are ignored.

thus in the comparison, user=phone is ignored.  but this doesn't really
make sense, since according to table 2, the only mandatory component in
to and from fields is host.  thus also the two urls

sip:bar.com
sip:[email-masked];user=phone

would match.  so it looks to me like section 2.1 would require some
rewording.

-- juha

_______________________________________________
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: Neil Deason <[email-masked]>
Date: Mon, 26 Feb 2001 15:14:34 +0000

Juha Heinanen wrote:
> thus in the comparison, user=phone is ignored. 

No, if a componment is omitted it matches on it's default 
value. Table 2 defines the default value for user-param as 
'ip' not 'phone'.

> but this doesn't really

These don't match either - the user part is still significant
in the comparison despite being omitted from one URL.

Cheers,
Neil
-- 
Ubiquity Software Corporation, UK        http://www.ubiquity.net

---

From: Gethin Liddell <[email-masked]>
Date: Mon, 26 Feb 2001 15:35:50 +0000

I believe the confusion is over the last line of the paragraph: 

"Components not found in both URLs being compared are ignored."

What this is supposed to mean (I think) is that parameters without default 
values such as maddr-param or *future-parameters* should be ignored if they 
only exist in one sip url:

e.g. the following are equivalent:

sip:[email-masked];transport=UDP
sip:[email-masked]
sip:[email-masked];maddr=sip.mcast.net;foo=bar

but not these:

sip:[email-masked];transport=TCP
sip:[email-masked]

I do however think that this should be re-fined for parameters that are not 
known about. for example it is impossible for a server to make a 
correct decision on the equality of two unknown parameters

e.g. is

sip:[email-masked];foo=BAR

equivalent to

sip:[email-masked];foo=bar

IMHO I believe that unknown parameters should be ignored when doing a 
comparison.

This confusion isn't helped by the incomplete examples given in the latest 
bis, though i believe these have been correct ed for the next release.

On Monday 26 February 2001 15:14, Neil Deason wrote:
> > o user or telephone-subscriber, password, host, port and any
> > url-parameter parameters of the URI must match. If a component is
> > omitted, it matches based on its default value. (For example, otherwise
> > equivalent URLs without a port specification and with port 5060 match.)
> > Components not found in both URLs being compared are ignored.
> >

-- 
Gethin Liddell
Ubiquity Software Corp.
Ubiquity House
Langstone Park
NP6 2LH
UK

Tel: 44 (0) 1633 765600
Fax: 44 (0) 1633 765601

URL: www.ubiquity.net

---

From: Juha Heinanen <[email-masked]>
Date: Mon, 26 Feb 2001 20:26:42 +0200 (EET)

> value. Table 2 defines the default value for user-param as 

thanks for the clarification.

 > in the comparison despite being omitted from one URL.

where is that rule stated in the bis?

-- juha

---

From: Neil Deason <[email-masked]>
Date: Tue, 27 Feb 2001 09:20:56 +0000

> where is that rule stated in the bis?

This is covered by the text stating that user parameters of
the URI must match and if any URI components are omitted you 
match against it's default value. (Section 2.1, 3rd bullet 
point)

User has no default value defined, so for the SIP URLs:
    sip:bar.com
    sip:[email-masked]
you compare an 'empty user/null' with 'foo' which obviously don't
match.

Cheers,
Neil.