<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC0822 SYSTEM "reference.RFC.2119.xml">
<!ENTITY RFC0822 SYSTEM "reference.RFC.5322.xml">
<!ENTITY RFC2045 SYSTEM "reference.RFC.2045.xml">
<!ENTITY RFC2392 SYSTEM "reference.RFC.2392.xml">
<!ENTITY RFC3261 SYSTEM "reference.RFC.3261.xml">
<!ENTITY RFC4483 SYSTEM "reference.RFC.4483.xml">
<!ENTITY RFC5368 SYSTEM "reference.RFC.5368.xml">
<!ENTITY RFC5621 SYSTEM "reference.RFC.5621.xml">
<!ENTITY RFC6442 SYSTEM "reference.RFC.6442.xml">
<!ENTITY RFC8174 SYSTEM "reference.RFC.8174.xml">

]>
<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc sortrefs="no" ?>
<?rfc strict="yes" ?>


<rfc number="8262" ipr="trust200902" category="std" 
     updates="5368, 5621, 6442" submissionType="IETF" >
  <front>
    <title abbrev="Content-ID in SIP">
      Content-ID Header Field in the Session Initiation Protocol (SIP)
    </title>
      <author initials="C.H." surname="Holmberg" fullname="Christer Holmberg">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street>Hirsalantie 11</street>
          <code>02420</code>
          <city>Jorvas</city>
          <country>Finland</country>
        </postal>
        <email>christer.holmberg@ericsson.com</email>
      </address>
    </author>
    <author initials="I.S." surname="Sedlacek" fullname="Ivo Sedlacek">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street>Sokolovska 79</street>
          <code>18600</code>
          <city>Praha</city>
          <country>Czech Republic</country>
        </postal>
        <email>ivo.sedlacek@ericsson.com</email>
      </address>
    </author>

    <date month="October" year="2017"/>
    <area>Transport</area>
    <workgroup>SIPCORE Working Group</workgroup>
    <keyword>SIP</keyword>
    <abstract>
<t>This document specifies the Content-ID header field for usage in the
Session Initiation Protocol (SIP). This document also updates RFC 5621, which
only allows a Content-ID URL to reference a body part that is part of a
multipart message-body. This update enables a Content-ID URL to reference a
complete message-body and metadata provided by some additional SIP header
fields. 
</t>
      <t>This document updates RFC 5368 and RFC 6442 by clarifying their
      usage of the SIP Content-ID header field. 
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction" toc="default">
      <section title="Identifying a Body Part" toc="default">
        <t>
          A SIP message consists of a start-line, one or more header fields, an
          empty line indicating the end of the header fields, and
          an optional message-body as specified in <xref target="RFC3261"
	  pageno="false" format="default"/>. 
        </t><t>
          The message-body can be a non-multipart message-body or a multipart message-body as
          specified in <xref target="RFC3261" pageno="false" format="default"/>.
        </t><t>
          <xref target="RFC5621" pageno="false" format="default"/> defines generic handling
          of a multipart message-body in a SIP message.
        </t><t>
          A multipart message-body contains zero, one, or several body parts
	  encoded using the format define in <xref target="RFC2045" pageno="false" format="default"/>.
        </t><t>
          A body part in the multipart message-body is described using header fields such as
          Content-Disposition, Content-Encoding, and Content-Type, which provide information
          on the content of the body part as specified in <xref
	  target="RFC5621" pageno="false" format="default"/>. 
          A body part in the multipart message-body can also contain a Content-ID header
          field with an ID value uniquely identifying the body part as specified in
          <xref target="RFC2045" pageno="false" format="default"/>.
        </t>
      </section>
      <section title="Referencing a Body Part" toc="default">
        <t>
          A SIP header field can reference a body part using a Content-ID URL as specified
          in <xref target="RFC5621" pageno="false" format="default"/>.
        </t><t>
          The Content-ID URL is specified in <xref target="RFC2392" pageno="false" format="default"/>.
          <xref target="RFC2392" pageno="false" format="default"/> specifies how to identify the body
          part referenced by a Content-ID URL. The Content-ID URL value is included in the Content-ID
          header field of the body part.
        </t><t>
          Examples of SIP header fields referencing a body part using a Content-ID URL are:
          <list style="symbols">
            <t>
              <xref target="RFC6442" pageno="false" format="default"/>
	      specifies how a Geolocation header field references a body part
	      using a Content-ID URL for providing location information. 
            </t>
            <t>
              <xref target="RFC5368" pageno="false" format="default"/>
	      specifies how a Refer-To header field references a body part
	      using a Content-ID URL to provide a list of targets. 
            </t>
          </list>
      </t>
      </section>
      <section title="Problem Statement" toc="default">
        <t>
          How to uniquely identify a complete message-body of
          a SIP message using a Content-ID header field and how to reference
	  a complete message-body 
          using a Content-ID URL are not currently specified.
        </t>
        <t>
          Note: In <xref target="RFC5621" pageno="false" format="default"/>, the Content-ID URL
          references a specific body part only.
        </t>
        <t>Some existing specifications, such as <xref target="RFC5368"
	pageno="false" format="default"/>, contain examples that
	show usage of a SIP Content-ID header field referencing a complete  
            message-body, even though such usage has never been
	    specified. Many implementors have interpreted these examples to
	    indicate that such usage is allowed by the corresponding
	    specification, despite the absence of language allowing it. This
	    document updates the normative language in the affected documents
	    to explicitly allow such usage. 
        </t>
      </section>
      <section title="Consequences" toc="default">
        <t>
        The examples below show the consequences of the problem described above.
        </t>
        <section title="Example 1: SIP INVITE" toc="default">
          <t>
   If a User Agent Client (UAC) sends an INVITE request that conveys
   location by value (as specified in <xref target="RFC6442" pageno="false" format="default"/>) and
   decides not to include a Session Description Protocol (SDP) offer, then the UAC
   needs to include only one MIME entity in the INVITE request. This MIME entity can be, for example, of
	    the 'application/pidf+xml' MIME type. 
          </t><t>
            However, due to <xref target="RFC6442" pageno="false"
	    format="default"/> requiring inclusion of a Geolocation header
	    field referencing the body part with the location information, the
	    UAC includes a multipart message-body with a single body part in
	    the INVITE request, and includes the location information of
	    'application/pidf+xml' MIME type and an associated Content-ID header
	    field in the body part. 
          </t>

          <figure>
            <artwork><![CDATA[
  Example message (SIP INVITE):

  INVITE sips:bob@biloxi.example.com SIP/2.0
  Via: SIPS/2.0/TLS pc33.atlanta.example.com;branch=z9hG4bK74bf9
  Max-Forwards: 70
  To: Bob <sips:bob@biloxi.example.com>
  From: Alice <sips:alice@atlanta.example.com>;tag=9fxced76sl
  Call-ID: 3848276298220188511@atlanta.example.com
  Geolocation: <cid:target123@atlanta.example.com>
  Geolocation-Routing: no
  Accept: application/sdp, application/pidf+xml
  CSeq: 31862 INVITE
  Contact: <sips:alice@atlanta.example.com>
  Content-Type: multipart/mixed; boundary=boundary1
  Content-Length: ...

  --boundary1
  Content-Type: application/pidf+xml
  Content-ID: <target123@atlanta.example.com>

  <?xml version="1.0" encoding="UTF-8"?>
  <presence
    xmlns="urn:ietf:params:xml:ns:pidf"
    xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
    xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
    xmlns:cl="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
    xmlns:gml="http://www.opengis.net/gml"
    xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
    entity="pres:alice@atlanta.example.com"
    >
    <dm:device id="target123-1">
      <gp:geopriv>
        <gp:location-info>
          <gml:location>
            <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
              <gml:pos>32.86726 -97.16054</gml:pos>
            </gml:Point>
          </gml:location>
        </gp:location-info>
        <gp:usage-rules>
          <gbp:retransmission-allowed>no
          </gbp:retransmission-allowed>
          <gbp:retention-expiry>2010-11-14T20:00:00Z
          </gbp:retention-expiry>
        </gp:usage-rules>
        <gp:method>802.11</gp:method>
      </gp:geopriv>
      <dm:deviceID>mac:1234567890ab</dm:deviceID>
      <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
    </dm:device>
  </presence>
  --boundary1--

         ]]></artwork>
          </figure>
        </section>
        <section title="Example 2: SIP REFER" toc="default">
          <t>
            If a UAC sends a REFER request including a list of targets as specified in
            <xref target="RFC5368" pageno="false" format="default"/>, then the UAC needs to
            include only one MIME entity in the REFER request. This MIME entity is of the
            'application/resource&nbhy;lists+xml' MIME type.
          </t><t>
            However, due to <xref target="RFC5368" pageno="false" format="default"/> requiring
            inclusion of a Refer-To header field referencing the body part
	    containing the list of targets, 
            the UAC includes a multipart message-body with a single body part in the REFER request
            and includes the list of targets of 'application/resource-lists+xml' MIME type and an
            associated Content-ID header field in the body part.
          </t>
          <figure>
            <artwork><![CDATA[

  Example message (SIP REFER):

  REFER sip:conf-123@example.com;gruu;opaque=hha9s8d-999a  SIP/2.0
  Via: SIP/2.0/TCP client.chicago.example.com;branch=z9hG4bKhjhs8ass83
  Max-Forwards: 70
  To: "Conference 123" <sip:conf-123@example.com>
  From: Carol <sip:carol@chicago.example.com>;tag=32331
  Call-ID: d432fa84b4c76e66710
  CSeq: 2 REFER
  Contact: <sip:carol@client.chicago.example.com>
  Refer-To: <cid:cn35t8jf02@example.com>
  Refer-Sub: false
  Require: multiple-refer, norefersub
  Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
  Allow-Events: dialog
  Accept: application/sdp, message/sipfrag
  Content-Type: multipart/mixed; boundary=boundary1
  Content-Length: ...

  --boundary1
  Content-Type: application/resource-lists+xml
  Content-Disposition: recipient-list
  Content-ID: <cn35t8jf02@example.com>

  <?xml version="1.0" encoding="UTF-8"?>
  <resource-lists
    xmlns="urn:ietf:params:xml:ns:resource-lists"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >
    <list>
      <entry uri="sip:bill@example.com?method=BYE"/>
      <entry uri="sip:joe@example.org?method=BYE"/>
      <entry uri="sip:ted@example.net?method=BYE"/>
    </list>
  </resource-lists>
  --boundary1--

         ]]></artwork>
          </figure>
        </section>
      </section>
      <section title="Solution" toc="default">
        <t>
          In order to solve the problems described above, this document:
          <list style="symbols">
              <t>Specifies and registers the Content-ID header field as a SIP header field.
              </t>
              <t>Specifies that, when used as a SIP header field, the Content-ID header field
              identifies the complete message-body and the metadata provided by some additional
              SIP header fields of the SIP message.
              </t>
              <t>Updates <xref target="RFC5621" pageno="false" format="default"/> to enable a
              Content-ID URL to reference a complete message-body and the metadata provided by some
              additional SIP header fields.
              </t>
              <t>Updates <xref target="RFC5368" pageno="false" format="default"/> and
              <xref target="RFC6442" pageno="false" format="default"/> by
	      adding text that explicitly states
              that a SIP Content-ID header field can be used.
              </t>
          </list>
        </t>
      </section>
      <section title="Backward Compatibility" toc="default">
        <t>
            If an existing specification only defines the usage of a
            multipart message-body to carry a single body part to be referenced
            by a Content-ID URL, implementations MUST NOT carry the MIME entity
            in a non-multipart message-body unless the specification is updated
            to explicitly allow it.
        </t>
      </section>
    </section>

    <section title="Conventions">
<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="Content-ID" title="Content-ID Header Field">
      <section anchor="Content-ID-Introduction" title="Introduction">
        <t>
          This section defines the usage of the Content-ID header field for SIP.
        </t>
      </section>

      <section anchor="Content-ID-Syntax" title="Syntax">
        <t>
          The ABNF <xref target="RFC5234"></xref> for the Content-ID header field is:
        </t>

        <figure>
          <artwork><![CDATA[

   Content-ID = "Content-ID" HCOLON msg-id

   msg-id     = "<" id-left "@" id-right ">"

   Note: id-left and id-right are specified in [RFC5322]. HCOLON is
   defined in [RFC3261].

   Note: When used in a SIP header field, the msg-id syntax has been
   simplified, compared to the syntax in [RFC5322], to disallow the use
   of comments and to adopt to the SIP usage of leading white space.

   The value of the Content-ID header field value must be unique in the
   context of a given SIP message, including any embedded MIME
   Content-ID header field values. Note that the SIP Content-ID header
   field value is not expected to be unique among all SIP messages; it
   has no meaning outside of the message in which it is included.

       ]]></artwork>
        </figure>
      </section>

      <section anchor="Content-ID-Semantic" title="Semantics">
        <t>The Content-ID header field included in the header fields of a SIP message
        identifies the message-body of the SIP message and
        the metadata provided by:
          <list style="symbols">
            <t>
              A MIME-Version header field, if included in the header fields of
              the SIP message.
            </t><t>
              Any 'Content-' prefixed header fields (including the Content-ID
              header field itself) included in the header fields of the
              SIP message.
            </t>
          </list>
        </t>
        <t>
          The Content-ID header field can be included in any SIP message that
          is allowed to contain a message-body.
        </t>
        <t>
          Note: The message-body identified by the Content-ID header field can
          be a non-multipart message-body or a multipart message-body.
        </t>
      </section>
      <section anchor="Content-ID-Procedures" title="Procedures">

        <section anchor="Content-ID-UA-Procedures" title="User Agent (UA) Procedures">
          <t>
            A UA MAY include a Content-ID header field in any SIP message that is allowed
            to contain a message-body.
          </t><t>
            A UA MUST NOT include a Content-ID header field in any SIP message that is
            not allowed to contain a message-body.
          </t><t>
            A UA MUST set the value of the Content-ID header field to a value that
            is unique in the context of the SIP message.
          </t>
        </section>
<section anchor="Content-ID-proxy-Procedures" title="Proxy Procedures">

          <t>
            A proxy MUST NOT add a Content-ID header field in a SIP message.
          </t><t>
            A proxy MUST NOT modify a Content-ID header field included in a SIP message.
          </t><t>
            A proxy MUST NOT delete a Content-ID header field from a SIP message.
          </t>
        </section>

        <section anchor="Content-ID-example-Procedures" title="Example: Referencing the Message-Body of a SIP Message">
          <t>
            The figure shows an example from <xref target="RFC5368" pageno="false"
            format="default"/>, where the SIP Content-ID header field is used to
            reference the message-body (non-multipart) of a SIP message.
          </t>
          <figure>
            <artwork><![CDATA[

REFER sip:conf-123@example.com;gruu;opaque=hha9s8d-999a  SIP/2.0
Via: SIP/2.0/TCP client.chicago.example.com
        ;branch=z9hG4bKhjhs8ass83
Max-Forwards: 70
To: "Conference 123" <sip:conf-123@example.com>
From: Carol <sip:carol@chicago.example.com>;tag=32331
Call-ID: d432fa84b4c76e66710
CSeq: 2 REFER
Contact: <sip:carol@client.chicago.example.com>
Refer-To: <cid:cn35t8jf02@example.com>
Refer-Sub: false
Require: multiple-refer, norefersub
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Allow-Events: dialog
Accept: application/sdp, message/sipfrag
Content-Type: application/resource-lists+xml
Content-Disposition: recipient-list
Content-Length: 362
Content-ID: <cn35t8jf02@example.com>

<?xml version="1.0" encoding="UTF-8"?>
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <list>
    <entry uri="sip:bill@example.com?method=BYE" />
    <entry uri="sip:joe@example.org?method=BYE" />
    <entry uri="sip:ted@example.net?method=BYE" />
  </list>
</resource-lists>

         ]]></artwork>
          </figure>
        </section>
      </section>
    </section>

    <section anchor="section.rfcupdate.5368" title="Update to RFC 5368">
        <t>
            This section updates the second paragraph in Section 7 of
            <xref target="RFC5368" pageno="false" format="default"/>
            by allowing usage of either a MIME Content-ID header field
            or a SIP Content-ID header field to label the body part or
            the message-body carrying the URI list.
        </t>
<t>OLD TEXT:
<list>
<t>
   The Refer-To header field of a REFER request with multiple REFER-
   Targets MUST contain a pointer (i.e., a Content-ID Uniform Resource
   Locator (URL) as per RFC 2392 [RFC2392]) that points to the body part
   that carries the URI list. The REFER-Issuer SHOULD NOT include any
   particular URI more than once in the URI list.
</t>
</list>
</t>

<t>NEW TEXT:
<list>
<t>
   The Refer-To header field of a REFER request with multiple REFER-
   Targets MUST contain a pointer (i.e., a Content-ID Uniform Resource
   Locator (URL) as per RFC 2392 <xref target="RFC2392" />) that points to the body part
   or message-body that carries the URI list. The REFER-Issuer SHOULD
   NOT include any particular URI more than once in the URI list. The
   REFER request can use either a MIME Content-ID header field <xref
   target="RFC4483" />
   or a SIP Content-ID header field [RFC8262] to label the body part or
   the message-body.
</t>
</list>
</t>
    </section>

        <section anchor="section.rfcupdate.5621" title="Update to RFC 5621">
        <t>This section updates Section 9.1 of <xref target="RFC5621" pageno="false"
        format="default"/> by allowing a Content-ID URL to reference a message-body
        and the related metadata (<xref target="Content-ID-Semantic" pageno="false"
        format="default"/>) in addition to allowing a reference to a body part.
        </t>
<t>OLD TEXT:
<list>
<t>
   Content-ID URLs allow creating references to body parts. A given
   Content-ID URL [RFC2392], which can appear in a header field or
   within a body part (e.g., in an SDP attribute), points to a
   particular body part.
 </t>
</list>
</t>

<t>NEW TEXT:
<list>
<t>
   Content-ID URLs allow the creation of references to body parts or
   message-bodies (and the header fields describing the
   message-bodies). A given Content-ID URL <xref target="RFC2392" />, which can appear
   in a header field or within a body part (e.g., in an SDP attribute),
   points to a particular body part or the message-body (and the
   header fields describing the message-body).
</t>
</list>
</t>
    </section>

    <section anchor="section.rfcupdate.6442" title="Update to RFC 6442">
        <t>This section updates the second paragraph in Section 3.1 of
        <xref target="RFC6442" pageno="false" format="default"/> by allowing
        usage of either a MIME Content-ID header field or a SIP Content-ID header field
        to label the body part or the message-body carrying the location data.
        </t>
<t>OLD TEXT:
<list>
<t>
   In Figure 1, Alice is both the Target and the LS that is conveying
   her location directly to Bob, who acts as an LR. This conveyance is
   point-to-point: it does not pass through any SIP-layer intermediary.
   A Location Object appears by-value in the initial SIP request as a
   MIME body, and Bob responds to that SIP request as appropriate.
   There is a 'Bad Location Information' response code introduced within
   this document to specifically inform Alice if she conveys bad
   location information to Bob (e.g., Bob "cannot parse the location provided", or
   "there is not enough location information to determine where Alice
   is").
</t>
</list>
</t>
<t>NEW TEXT:
<list>
<t> 
   In Figure 1, Alice is both the Target and the LS that is conveying
   her location directly to Bob, who acts as an LR.  This conveyance is
   point-to-point: it does not pass through any SIP-layer intermediary.
   A Location Object appears by-value in the initial SIP request as a
   MIME body, and Bob responds to that SIP request as appropriate.
   Either a MIME Content-ID header field <xref target="RFC4483" /> or the SIP Content-ID
   header field [RFC8262] MUST be used to label the location
   information. There is a 'Bad Location Information' response code
   introduced within this document to specifically inform Alice if she
   conveys bad location information to Bob (e.g., Bob "cannot parse the location
   provided", or "there is not enough location information to determine
   where Alice is").                         
</t>
</list>
</t>
    </section>

    <section anchor="section.sec" title="Security Considerations">
      <t>
        The Content-ID header field value MUST NOT reveal sensitive user information.
      </t><t>
        If the message-body associated with the Content-ID header field is an
        encrypted body, it MUST NOT be possible to derive a key that can be used
        to decrypt the body from the Content-ID header field value.
      </t>
    </section>
    <section anchor="section.iana" title="IANA Considerations">
      <t>
        This specification registers a new SIP header field according to the
	procedures defined in <xref target="RFC3261" pageno="false" format="default"/>.
      </t>
      <section anchor="section.iana.header" title="Header Field">
        <t>
          The header field described in <xref target="Content-ID"/> has been registered
          in the "Header Fields" sub-registry of the "Session Initiation Protocol (SIP)
          Parameters" registry by adding a row with these values:
<list>
<t>Header Name:  Content-ID</t>
<t>compact:</t>
<t>Reference:  RFC 8262</t>
</list>
</t>
      </section>
    </section>
  </middle>
  <back>

<references title="Normative References">
      <?rfc include="reference.RFC.2045"?>
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.2392"?>
      <?rfc include="reference.RFC.3261"?>
      <?rfc include="reference.RFC.4483"?>
      <?rfc include="reference.RFC.5234"?>
      <?rfc include="reference.RFC.5322"?>
      <?rfc include="reference.RFC.5621"?>
      <?rfc include="reference.RFC.8174"?>
    </references>
    <references title="Informative References">
      <?rfc include="reference.RFC.5368"?>
      <?rfc include="reference.RFC.6442"?>
    </references>
  </back>
</rfc>
