Subject: Re: [Sip] Header comparision

From: "Madhusudhan" <[email-masked]>
Date: Fri, 10 May 2002 13:07:56 +0530

Hi

Section 20 of bis09 mentions

  "The Contact, From, and To header fields contain a URI. If the URI
   contains a comma, question mark or semicolon, the URI MUST be
   enclosed in angle brackets (< and >). Any URI parameters are
   contained within these brackets. If the URI is not enclosed in angle
   brackets, any semicolon-delimited parameters are header-parameters,
   not URI parameters"

 From the above comments, I think it is evident that the two addresses are
different.

correct me if I am wrong!!!

Regards

Madhusudhan

>
> ----- Original Message -----
> From: "Christer Holmberg" <[email-masked]>
> To: <[email-masked]>
> Sent: Friday, May 10, 2002 12:11 PM
> Subject: [Sip] Header comparision
>
>
> >
> > Hi,
> >
> > I have a small clarification question on To- and From header
> > comparision.
> >
> > Chapter 8.2.6.2 says:
> >
> > "The From field of the response MUST equal the From header field of
> > the request."
> >
> > Later in the chapter it explains the use of tags.
> >
> > However, there is nothing said (not in the URI comparision chapter
> > either) about the "<" and ">" characters, so my question is:
> >
> > If the UAC doesn't include "<" and ">" in the request, and the UAS DOES
> > include them in the response, is it a protocol error?
> >
> > example:
> >
> > Request:
> >
> > To: [email-masked]
> >
> > Response:
> >
> > To: <[email-masked]>
> >
> >
> > Regards,
> >
> > Christer Holmberg
> > Ericsson Finland
> >
> >
> >
> >
> > _______________________________________________
> > Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
> > This list is for NEW development of the core SIP Protocol
> > Use [email-masked] for questions on current sip
> > Use [email-masked] for new developments on the application of sip
> >
> >
>
>
>

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Christer Holmberg <[email-masked]>
Date: Fri, 10 May 2002 11:05:54 +0300

Hi Madhusudhan,

Thanks for your comments!

However, I think we are talking about two separate issues.

Yes, in some cases (as mentioned) the URI MUST be enclosed in angle brackets,
but that does NOT mean you aren't allowed to enclose the URI in angle brackets
ALSO in other cases. For example:

To: <sip:[email-masked]>

...is allowed from a SIP syntax point of view.

However, my question was related to the COMPARISION of headers.

Regards,

Christer Holmberg
Ericsson Finland

---

From: "vishal" <[email-masked]>
Date: Fri, 10 May 2002 14:21:53 +0530

Hi christer,
    From,To,Call-Id ,Cseq fields of sip response MUST exactly match
corresponding request.If it does not match exactly ,then it should be
protocol error .

Reason:
   you dont require addition checking while copying these fields .

case you described ,
To: [email-masked] and
To: <[email-masked]>  are equivalent ,not equal.

please refer to sip bis 09  section 8.2.6.2 below

"8.2.6.2 Headers and Tags

   The From field of the response MUST equal the From header field of
   the request. The Call-ID header field of the response MUST equal the
   Call-ID header field of the request. The CSeq header field of the
   response MUST equal the CSeq field of the request. The Via header
   field values in the response MUST equal the Via header field values
   in the request and MUST maintain the same ordering.

   If a request contained a To tag in the request, the To header field
   in the response MUST equal that of the request. However, if the To
   header field in the request did not contain a tag, the URI in the To
   header field in the response MUST equal the URI in the To header
   field; additionally, the UAS MUST add a tag to the To header field in
   the response (with the exception of the 100 (Trying) response, in
   which a tag MAY be present)"

regards, vishal

---

From: Christer Holmberg <[email-masked]>
Date: Fri, 10 May 2002 12:18:19 +0300

Hi,

I know what chapter 8.2.6.2 says, but my question was if it really also affects
the angle brackets.

Another related issue: chapter 19.1.4 says that the uri parameter ordering is
not significant for URI comparision, but according to chapter 8.2.6.2 the uri
parameter ordering would have to match in a request/response transaction.

Also, from a URI comparision point of view, some parts of the URI are
case-insensitive. But, does it mean that within a transaction everything is
case-sensitive?

Regards,

Christer Holmberg
Ericsson Finland

---

From: "vishal" <[email-masked]>
Date: Fri, 10 May 2002 15:00:07 +0530

Hi christer ,
   I am trying to say that ....YES IT REALLY MATTERS ,if From field does not
exactly matches then it is an error .Another question is ....why UAS will
add angular brackets  ...and why UAC will further check different syntax
available after receiving message sent by UAS??

best solution is to compare From field as was sent in initial request .

regards, vishal

----- Original Message -----
From: Christer Holmberg <[email-masked]>
To: vishal <[email-masked]>
Cc: Madhusudhan <[email-masked]>; <[email-masked]>
Sent: Friday, May 10, 2002 2:48 PM
Subject: Re: [Sip] Header comparision

> > > >  From the above comments, I think it is evident that the two
addresses
> > are
> > > > > > If the UAC doesn't include "<" and ">" in the request, and the
UAS
> > DOES

---

From: Christer Holmberg <[email-masked]>
Date: Fri, 10 May 2002 13:09:37 +0300

Hi,

> best solution is to compare From field as was sent in initial request .

Yes, you can do a pure binary comparision, but that also requires the order the
uri parameters are the same, there is no case difference etc.

Why I would want to do this or that (I didn't even said I would) really doesn't
matter. I am just trying to get a clarification on the angle bracket case, the
uri parameter order case, and the case sensitivity case, for header mapping
within a transaction...

Regards,

Christer Holmberg
Ericsson Finland

---

From: Gonzalo Camarillo <[email-masked]>
Date: Mon, 13 May 2002 11:12:51 +0300

Christer,

as you have pointed out, the comparison rules for To and From header
felds are not properly defined in bis. You have to perform URI
comparison. Therefore, user names and angle brakets do not affect the
comparison. This will be clarified in subsequent versions of the spec.

Regards,

Gonzalo

-- 
Gonzalo Camarillo         Phone :  +358  9 299 33 71
Oy L M Ericsson Ab        Mobile:  +358 40 702 35 35
Telecom R&D               Fax   :  +358  9 299 30 52
FIN-02420 Jorvas          Email :  [email-masked]
Finland                   http://www.hut.fi/~gonzalo