<?xml version="1.0" encoding="ascii"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.40 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC3261 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3261.xml">
<!ENTITY RFC5234 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC3515 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3515.xml">
<!ENTITY RFC3892 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3892.xml">
<!ENTITY RFC4508 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4508.xml">
<!ENTITY RFC5360 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5360.xml">
<!ENTITY RFC3325 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3325.xml">
<!ENTITY RFC5002 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5002.xml">
<!ENTITY RFC5318 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5318.xml">
<!ENTITY RFC5502 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5502.xml">
]>

<?rfc toc="yes"?>

<rfc ipr="trust200902" docName="draft-ietf-sipcore-name-addr-guidance-02" category="std" updates="3261, 3325, 3515, 3892, 4508, 5002, 5318, 5360, 5502">

  <front>
    <title abbrev="Name-addr Clarifications">Clarifications for when to use the name-addr production in SIP messages</title>

    <author initials="R." surname="Sparks" fullname="Robert Sparks">
      <organization>Oracle</organization>
      <address>
        <email>rjsparks@nostrum.com</email>
      </address>
    </author>

    <date year="2017" month="June" day="01"/>

    
    
    

    <abstract>


<t>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 alternative.</t>

<t>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 the RFCs that
define extension SIP header fields using the alternative to clarify that the
constraint applies (RFCs 3325, 3515, 3892, 4508, 5002, 5318, 5360, and 5502).</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t><xref target="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 <xref target="RFC5234"/> 
specified in <xref target="RFC3261"/> shows the relevant part of the definition of the 
syntax of the "From" header field:</t>

<figure><artwork><![CDATA[
  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
]]></artwork></figure>

<t>The prose in section 20.20 of <xref target="RFC3261"/>, which discusses the "From" 
header field, constrains how the production may be used by saying:</t>

<figure><artwork><![CDATA[
   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.
]]></artwork></figure>

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

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

<figure><artwork><![CDATA[
  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 >). 
]]></artwork></figure>

<t>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.</t>

<t>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.</t>

<t>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.</t>

<t>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 will,
in most cases, be interpreted as header field parameters or additional header
field values as discussed in section 7.3.1 of <xref target="RFC3261"/>. (An exception
is the degenerate case of a URL like sip:10.0.0.1,@10.0.0.0 where it is
possible to parse the comma via the 'user' production).</t>

</section>
<section anchor="terminology" title="Terminology">

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

</section>
<section anchor="updates-to-rfc3261" title="Updates to RFC3261">

<t>This text from the introduction to section 20 of <xref target="RFC3261"/>:</t>

<figure><artwork><![CDATA[
  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. 
]]></artwork></figure>

<t>is replaced with:</t>

<figure><artwork><![CDATA[
 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". 
]]></artwork></figure>

</section>
<section anchor="updates-to-rfcs-defining-sip-extension-header-fields" title="Updates to RFCs defining SIP Extension header fields">

<t>The following standards track RFCs:
<xref target="RFC3515"/>, <xref target="RFC3892"/>, <xref target="RFC4508"/>, and <xref target="RFC5360"/></t>

<t>and the following informational RFCS:
<xref target="RFC3325"/>, <xref target="RFC5002"/>, <xref target="RFC5318"/>, and <xref target="RFC5502"/></t>

<t>are updated to include:</t>

<figure><artwork><![CDATA[
  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.
]]></artwork></figure>

<t>The status of the Informational RFCs remains Informational.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>This memo has no considerations for IANA.</t>

</section>
<section anchor="security-considerations" title="Security Considerations">

<t>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-interpreted by the receiving
element.</t>

</section>
<section anchor="acknowledgments" title="Acknowledgments">

<t>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, Dale Worley, and Yehoshua Gev.</t>

</section>
<section anchor="instructions-to-the-rfc-editor" title="Instructions to the RFC Editor">

<t>Please remove this section in its entirety before publication as an RFC.</t>

<t>Please replace any instances of RFCxxxx with the RFC number assigned to this memo.</t>

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

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC3261;
&RFC5234;
&RFC2119;
&RFC8174;
&RFC3515;
&RFC3892;
&RFC4508;
&RFC5360;
&RFC3325;
&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