Subject: RE: [Sip] ABNF for Replaces header

From: "Rob Phillips" <[email-masked]>
Date: Wed, 10 Jul 2002 06:16:12 -0500

I don't see this so much as a bug in the ABNF as much as a failure in the language.  By specifying the ABNF as such, you can have:
 
    Replaces: [email-masked]; to-tag=thetotag; from-tag=thefromtag
 
or
 
    Replaces: [email-masked]; from-tag=thefromtag; to-tag=thetotag
 
or
 
    Replaces: [email-masked]; myextension=whatever; from-tag=thefromtag; anotherextension=whatelse; to-tag=thetotag
 
The ABNF can't specify what is mandatory without specifying the order in which it should occur.  I think specifying the ABNF as-is and then having the trailing comment is just a way of saying, I don't care what order you put the parameters in, but I do care that you have these two parameters.  So yes, your two examples below are both invalid.
 
- rob

-----Original Message-----
From: Ganesh Sivaraman [mailto:[email-masked]]
Sent: Wednesday, July 10, 2002 4:35 AM
To: [email-masked]
Subject: [Sip] ABNF for Replaces header

Hi,
  Following is the ABNF for Replaces header as specified in draft-ietf-sip-replaces-02.txt:
 
Replaces = "Replaces" HCOLON callid *(SEMI replaces-param)
replaces-param = to-tag / from-tag / generic-param
to-tag = "to-tag" EQUAL token
from-tag = "from-tag" EQUAL token
 
According to this I could have Replaces headers like:
 
Replaces: abcd@efgh;to-tag=sdfsd --> (i)
Replaces: 1234ab@cde4 --> (ii)
 
But the text right below the Replaces header's definition in the draft states the following:
 
"A Replaces header MUST contain exactly one to-tag and exactly one from-tag, as they are required for unique dialog matching".
 
According to this textual description the above examples ( i & ii) are incorrect.
 
The ABNF doesn't seem to be matching this textual description. Is this a bug with the ABNF?
 
Thanks & Regards
Ganesh

---

From: Christer Holmberg <[email-masked]>
Date: Wed, 10 Jul 2002 14:29:51 +0300

Hi,

I would say that it is NOT an error from an ABNF poinf of view if one or
more of those parameters are missing - ie you will not get a parser
error. But, it is a bug from an APPLICATION point of view, since the
applications does require all the parameters.

(Another example is the URI, where some parameters sometimes are
mandatory/forbidden depending on the SIP header the URI is defined for.
Again, it is not a ABNF bug, but an APPLICATION bug, if some parameter
is missing, or if some parameter is present even if it shouldn't.)

Of course it is possible to make the parameters mandatory also in the
ABNF, but in that case, which was said, you would have to also specify
the order of them.

...OR you can add comments in the ABNF saying that all the parameters
are mandatory. I don't know if that is "according to the rules", but at
least Megaco uses "at-most-once", "at-most-one" etc -type of comments in
the ABNF grammar.

Just my thoughts...

Regards,

Christer Holmberg
Ericsson Finland

Rob Phillips wrote:

>  I don't see this so much as a bug in the ABNF as much as a failure in
> the language.  By specifying the ABNF as such, you can have:
> Replaces: [email-masked]; to-tag=thetotag;
> from-tag=thefromtagor    Replaces: [email-masked];
> from-tag=thefromtag; to-tag=thetotagor    Replaces:
> [email-masked]; myextension=whatever; from-tag=thefromtag;
> anotherextension=whatelse; to-tag=thetotagThe ABNF can't specify what
> is mandatory without specifying the order in which it should occur.  I
> think specifying the ABNF as-is and then having the trailing comment
> is just a way of saying, I don't care what order you put the
> parameters in, but I do care that you have these two parameters.  So
> yes, your two examples below are both invalid.- rob
>
>      Hi,  Following is the ABNF for Replaces header as specified
>      in draft-ietf-sip-replaces-02.txt:Replaces = "Replaces"
>      HCOLON callid *(SEMI replaces-param)replaces-param = to-tag
>      / from-tag / generic-paramto-tag = "to-tag" EQUAL
>      tokenfrom-tag = "from-tag" EQUAL token According to this I
>      could have Replaces headers like: Replaces:
>      abcd@efgh;to-tag=sdfsd --> (i)Replaces: 1234ab@cde4 -->
>      (ii)But the text right below the Replaces header's
>      definition in the draft states the following:"A Replaces
>      header MUST contain exactly one to-tag and exactly one
>      from-tag, as they are required for unique dialog
>      matching".According to this textual description the above
>      examples ( i & ii) are incorrect.The ABNF doesn't seem to be
>      matching this textual description. Is this a bug with the
>      ABNF?Thanks & RegardsGanesh
>

_______________________________________________
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