Subject: [Sip] SIP grammar

From: murali foru <[email-masked]>
Date: Wed, 26 Feb 2003 21:56:27 -0800 (PST)

Hi All,

I have a small doubt on SIP grammar defined in RFC
3261. I see the grammar to be ambigious.

Accept         =  "Accept" HCOLON
                   [ accept-range *(COMMA
accept-range) ]
accept-range   =  media-range *(SEMI accept-param)
media-range    =  ( "*/*"
                  / ( m-type SLASH "*" )
                  / ( m-type SLASH m-subtype )
                  ) *( SEMI m-parameter )
accept-param   =  ("q" EQUAL qvalue) / generic-param

Both m-parameter and  accept-param are delimited by
SEMI. How do I differentiate?

Thanks in advance

Regards,
Murali

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
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: Santhosh Jose <[email-masked]>
Date: Thu, 27 Feb 2003 13:59:18 +0530

Hello Murali,

Please refer to section 14.1 of RFC 2616 - Hypertext Transfer Protocol --
HTTP/1.1 (quoted below)

   Each media-range MAY be followed by one or more accept-params,
   beginning with the "q" parameter for indicating a relative quality
   factor. The first "q" parameter (if any) separates the media-range
   parameter(s) from the accept-params. Quality factors allow the user
   or user agent to indicate the relative degree of preference for that
   media-range, using the qvalue scale from 0 to 1 (section 3.9). The
   default value is q=1.

      Note: Use of the "q" parameter name to separate media type
      parameters from Accept extension parameters is due to historical
      practice. Although this prevents any media type parameter named
      "q" from being used with a media range, such an event is believed
      to be unlikely given the lack of any "q" parameters in the IANA
      media type registry and the rare usage of any media type
      parameters in Accept. Future media types are discouraged from
      registering any parameter named "q".

This clearly defines the usage of media and accept parameters .

Regards,
Santhosh Jose