Network Working Group                                          R. Sparks
Internet-Draft                                                    Oracle
Updates: 3261, 3325, 3515, 3892, 4508,                 February 28,                      May 10, 2017
         5002, 5318, 5360, 5502 (if
Intended status: Standards Track
Expires: September 1, November 11, 2017

Clarifications for when to use the name-addr production in SIP messages


   RFC3261 constrained several SIP header fields whose grammar contains
   the "name-addr / addr-spec" alternative to use name-addr when certain
   characters appear.  Unfortunately it expressed the constraints with
   prose copied into each header field definition, and at least one
   header field was missed.  Further, the constraint has not been copied
   into documents defining extension headers whose grammar contains the

   This document updates RFC3261 to state the constraint generically,
   and clarifies that the constraint applies to all SIP header fields
   where there is a choice between using name-addr or addr-spec.  It
   also updates those the RFCs that define extension SIP header fields that use using
   the alternative to clarify that the constraint applies (RFCs 3325,
   3515, 3892, 4508, 5002, 5318, 5360, and 5502).

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 1, November 11, 2017.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   ( in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Updates to RFC3261  . . . . . . . . . . . . . . . . . . . . .   3
   3.  Updates to RFCs defining SIP Extension header fields  . . . .   4
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   6.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .   4   5
   7.  Instructions to the RFC Editor  . . . . . . . . . . . . . . .   5
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .   5
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   [RFC3261] defines several header fields that contain URIs to allow
   both a form that contains the bare URI (addr-spec) and one that
   provides a name and the URI (name-addr).  This subset, taken from the
   ABNF [RFC5234] specified in [RFC3261] shows the relevant part of the
   definition of the syntax of the "From" header field:

     From        =  ( "From" / "f" ) HCOLON from-spec
     from-spec   =  ( name-addr / addr-spec )
                    *( SEMI from-param )
     name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
     addr-spec      =  SIP-URI / SIPS-URI / absoluteURI

   The prose in section 20.20 of [RFC3261], which discusses the "From"
   header field, constrains how the production may be used by saying:

      Even if the "display-name" is empty, the "name-addr" form
      MUST be used if the "addr-spec" contains a comma, question
      mark, or semicolon.

   Section 20.39, which discusses the "To" header field contains no such
   constraining text.

   This constraint is specified slightly differently, but with the same
   intent, in the introduction to section 20:

     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 >).

   Unfortunately, this can be read to only apply to the Contact, From,
   and To header fields, making it necessary to provide the constraint
   explicitly in the prose discussing any other header field using the
   name-addr or addr-spec alternative.

   As extension header fields were standardized, the specifications
   sometimes failed to include the constraint.  Many errata have been
   entered to correct this omission.  When the constraint was called
   out, the form has not been consistent.

   This memo updates the specifications of SIP and its extensions to
   clarify that the constraint to use the name-addr form applies
   anywhere there is a choice between the name-addr and addr-spec
   production rules in the grammar for SIP header fields.

   It is important to note that a message formed without honoring the
   constraint will still be syntactically valid, but would very likely
   be interpreted differently.  The characters after the comma, question
   mark, or semicolon would will, in most cases, be interpreted as header
   field parameters or additional header field values as discussed in
   section 7.3.1 of [RFC3261].  (An exception is the degenerate case of
   a URL like sip:,@ where it is possible to parse the
   comma via the 'user' production).

2.  Updates to RFC3261

   This text from the introduction to section 20 of [RFC3261]:

     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.

   is replaced with:

    When constructing the value of any SIP header field whose grammar
    allows choosing between name-addr and addr-spec, such as those
    that use the form '(name-addr / addr-spec)', the "addr-spec" form
    MUST NOT be used if its value would contain a comma, semicolon,
    or question mark.

    When a URI appears in such a header field, any URI parameters MUST
    be contained within angle brackets (< and >).  If the URI is not
    enclosed in angle brackets, any semicolon-delimited parameters are
    header-parameters, not URI parameters.

    The header fields defined in this specification that allow this
    choice are "To", "From", "Contact",  and "Reply-To".

3.  Updates to RFCs defining SIP Extension header fields

   The following standards track RFCs: [RFC3515], [RFC3892], [RFC4508],
   and [RFC5360]

   and the following informational RFCS: [RFC3325], [RFC5002],
   [RFC5318], and [RFC5502]

   are updated to include:

     This RFC contains the definition of one or more SIP header fields
     that allow choosing between addr-spec and name-addr when
     constructing header field values. As specified in RFCxxxx,
     the "addr-spec" form MUST NOT be used if its value would contain
     a comma, semicolon, or question mark.

   The status of the Informational RFCs remains Informational.

4.  IANA Considerations

   This memo has no considerations for IANA.

5.  Security Considerations

   The updates specified in this memo clarify a constraint on the
   grammar for producing SIP messages.  It introduces no new security
   considerations.  One pre-existing consideration is worth reiterating:
   messages produced without honoring the constraint will very likely be mis-
   mis-interpreted by the receiving element.

6.  Acknowledgments

   Brett Tate identified this issue in several extension documents,
   submitted several corresponding errata, and drove the discussion that
   led to this memo.  Substantive comments leading to this text were
   provided by Paul Kyzivat, Gonzalo Camarillo, and Dale Worley. Worley, and
   Yehoshua Gev.

7.  Instructions to the RFC Editor

   Please remove this section in its entirety before publication as an

   Please replace any instances of RFCxxxx with the RFC number assigned
   to this memo.

   This memo, if it is approved, obviates Errata 3744, 3894, and
   4648-4652 inclusive.

8.  Normative References

   [RFC3261]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
              A., Peterson, J., Sparks, R., Handley, M., and E.
              Schooler, "SIP: Session Initiation Protocol", RFC 3261,
              DOI 10.17487/RFC3261, June 2002,

   [RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", STD 68, RFC 5234,
              DOI 10.17487/RFC5234, January 2008,

   [RFC3515]  Sparks, R., "The Session Initiation Protocol (SIP) Refer
              Method", RFC 3515, DOI 10.17487/RFC3515, April 2003,

   [RFC3892]  Sparks, R., "The Session Initiation Protocol (SIP)
              Referred-By Mechanism", RFC 3892, DOI 10.17487/RFC3892,
              September 2004, <>.

   [RFC4508]  Levin, O. and A. Johnston, "Conveying Feature Tags with
              the Session Initiation Protocol (SIP) REFER Method",
              RFC 4508, DOI 10.17487/RFC4508, May 2006,

   [RFC5360]  Rosenberg, J., Camarillo, G., Ed., and D. Willis, "A
              Framework for Consent-Based Communications in the Session
              Initiation Protocol (SIP)", RFC 5360,
              DOI 10.17487/RFC5360, October 2008,

   [RFC3325]  Jennings, C., Peterson, J., and M. Watson, "Private
              Extensions to the Session Initiation Protocol (SIP) for
              Asserted Identity within Trusted Networks", RFC 3325,
              DOI 10.17487/RFC3325, November 2002,

   [RFC5002]  Camarillo, G. and G. Blanco, "The Session Initiation
              Protocol (SIP) P-Profile-Key Private Header (P-Header)",
              RFC 5002, DOI 10.17487/RFC5002, August 2007,

   [RFC5318]  Hautakorpi, J. and G. Camarillo, "The Session Initiation
              Protocol (SIP) P-Refused-URI-List Private-Header
              (P-Header)", RFC 5318, DOI 10.17487/RFC5318, December
              2008, <>.

   [RFC5502]  van Elburg, J., "The SIP P-Served-User Private-Header
              (P-Header) for the 3GPP IP Multimedia (IM) Core Network
              (CN) Subsystem", RFC 5502, DOI 10.17487/RFC5502, April
              2009, <>.

Author's Address

   Robert Sparks