<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd" [
	<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
	<!ENTITY RFC6904 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6904.xml">
	<!ENTITY RFC5285 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5285.xml">
	<!ENTITY RFC3611 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3611.xml">
	<!ENTITY RFC4585 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4585.xml">
	<!ENTITY RFC4588 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4588.xml">
	<!ENTITY RFC5109 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5109.xml">
	<!ENTITY RFC3264 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml">
	<!ENTITY RFC6347 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
	<!ENTITY RFC7201 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7201.xml">
	<!ENTITY RFC3550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml">
	<!ENTITY RFC7667 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7667.xml">
	<!ENTITY RFC8126 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml">
	<!ENTITY RFC2508 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2508.xml">
	<!ENTITY RFC3095 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3095.xml">
	<!ENTITY RFC3553 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3553.xml">
	<!ENTITY RFC3711 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3711.xml">
	<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
	<!ENTITY RFC5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
	<!ENTITY RFC4566 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4566.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no"?>
<?rfc sortrefs="yes" ?>
<rfc category="std" docName="draft-ietf-avtcore-rfc5285-bis-14.txt" ipr="trust200902" obsoletes="5285">
	<front>
		<title abbrev="RTP Header Extensions">A General Mechanism for RTP Header Extensions</title>
		<author initials="D.S." surname="Singer" fullname="David Singer">
			<organization>Apple, Inc.</organization>
			<address>
				<postal>
					<street>1 Infinite Loop</street>
					<city>Cupertino</city>
					<region>CA</region>
					<code>95014</code>
					<country>USA</country>
				</postal>
				<phone>+1 408 996 1010</phone>
				<email>singer@apple.com</email>
				<uri>http://www.apple.com/quicktime</uri>
			</address>
		</author>
		<author initials="H.D." surname="Desineni" fullname="Harikishan Desineni">
			<organization>Qualcomm</organization>
			<address>
				<postal>
					<street>10001 Pacific Heights Blvd</street>
					<city>San Diego</city>
					<region>CA</region>
					<code>92121</code>
					<country>USA</country>
				</postal>
				<phone>+1 858 845 8996</phone>
				<email>hdesinen@quicinc.com</email>
			</address>
		</author>
		<author initials="R.E." surname="Even" fullname="Roni Even" role="editor">
			<organization>Huawei Technologies</organization>
			<address>
				<postal>
					<street/>
					<city>Tel Aviv</city>
					<country>Israel</country>
				</postal>
				<email>Roni.even@huawei.com</email>
			</address>
		</author>
		<date month="August" year="2017"/>
		<area>ART</area>
		<workgroup>AVTCore</workgroup>
		<keyword>RFC</keyword>
		<keyword>Request for Comments</keyword>
		<keyword>I-D</keyword>
		<keyword>Internet-Draft</keyword>
		<keyword>XML</keyword>
		<keyword>Extensible Markup Language</keyword>
		<abstract>
			<t>This document provides a general mechanism to use the header extension feature of RTP (the Real-Time Transport Protocol).  It provides the option to use a small number of small extensions in each RTP packet, where the universe of possible extensions is large and registration is de-centralized.  The actual extensions in use in a session are signaled in the setup information for that session. This document obsoletes RFC5285.</t>
		</abstract>
	</front>
	<middle>
		<section title="Introduction">
			<t>The RTP specification <xref target="RFC3550"/> provides a capability to extend the RTP header. It defines the header extension format and rules for its use in Section 5.3.1. The existing header extension method permits at most one extension per RTP packet, identified by a 16-bit identifier and a 16-bit length field specifying the length of the header extension in 32-bit words.</t>
			<t>This mechanism has two conspicuous drawbacks. First, it permits only one header extension in a single RTP packet. Second, the specification gives no guidance as to how the 16-bit header extension identifiers are allocated to avoid collisions.</t>
			<t>This specification removes the first drawback by defining a backward-compatible and extensible means to carry multiple header extension elements in a single RTP packet. It removes the second drawback by defining that these extension elements are named by URIs, defining an IANA registry for extension elements defined in IETF specifications, and a Session Description Protocol (SDP) method for mapping between the naming URIs and the identifier values carried in the RTP packets.</t>
			<t>This header extension applies to RTP/AVP (the Audio/Visual Profile) and its extensions.</t>
			<t>This document obsoletes <xref target="RFC5285"/> and removes a limitation from RFC5285 that did not allow sending both one-byte and two-byte header extensions in the same RTP stream.</t>
		</section>
		<section title="Requirements Notation">
			<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
            "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
            and "OPTIONAL" in this document are to be interpreted as
            described in <xref target="RFC2119"/>.</t>
		</section>
		<section title="Design Goals">
			<t>The goal of this design is to provide a simple mechanism whereby multiple identified extensions can be used in RTP packets, without the need for formal registration of those extensions but nonetheless avoiding collision.</t>
			<t>This mechanism provides an alternative to the practice of burying associated metadata into the media format bit stream. This has often been done in media data sent over fixed-bandwidth channels. Once this is done, a decoder for the specific media format needs to extract the metadata. Also, depending on the media format, the metadata can be added at the time of encoding the media so that the bit-rate used for the metadata is taken into account. But the metadata can be unknown at that time. Inserting metadata at a later time can cause a decode and re-encode to meet bit-rate requirements.</t>
			<t>In some cases, a more appropriate, higher-level mechanism may be available, and if so, it can be used. For cases where a higher-level mechanism is not available, it is better to provide a mechanism at the RTP level than have the metadata be tied to a specific form of media data.
</t>
		</section>
		<section title="Packet Design">
			<section title="General">
				<t>The following design is fit into the "header extension" of the RTP extension, as described above.</t>
				<t>The presence and format of this header extension and its contents are negotiated or defined out-of-band, such as through signaling (see below for SDP signaling). The 16-bit identifier for the two forms of RTP extension defined here is only an architectural constant (e.g., for use by network analyzers);  it is the negotiation/definition (e.g., in SDP) that is the definitive indication that this header extension is present.</t>
				<t>   The RTP specification <xref target="RFC3550"/> states that RTP “is designed so
   that the header extension may be ignored by other interoperating
   implementations that have not been extended”. The intent of this
   restriction is that RTP header extensions MUST NOT be used to
   extend RTP itself in a manner that is backwards incompatible with
   non-extended implementations. For example, a header extension is
   not allowed to change the meaning or interpretation of the standard
   RTP header fields, or of the RTCP Control Protocol (RTCP). Header
   extensions MAY carry metadata in addition to the usual RTP header
   information, provided the RTP layer can function if that metadata
   is missing. For example, RTP header extensions can be used to carry
   data that's also sent in RTCP, as an optimisation to lower latency,
   since they'll fall back to the original, non-optimised, behaviour if
   the header extension is not present. The use of header extensions to
   convey information that will, if missing, disrupt the behaviour of a
   higher layer application that builds on top of RTP is only acceptable
   if this doesn't affect interoperability at the RTP layer. For
   example, applications that use the SDP BUNDLE extension with the MID
   RTP header extension <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/> to
   correlate RTP streams with SDP m= lines likely won’t work with full
   functionality if the MID is missing, but the operation of the RTP
   layer of those applications will be unaffected.
Support for RTP header extensions based on this memo is negotiated using, for example, SDP Offer/Answer <xref target="RFC3264"/>; intermediaries aware of the RTP header extensions are advised to be cautious when removing or generating RTP header extensions see section 4.7 of <xref target="RFC7667"/>.


</t>
				<t>The RTP header extension is formed as a sequence of extension elements, with possible padding.  Each extension element has a local identifier and a length.    The local identifiers MAY be mapped to a larger namespace in the negotiation (e.g., session signaling).</t>
				<section title="Transmission Considerations">
					<t>As is good network practice, data should only be transmitted when needed.  The RTP header extension SHOULD only be present in a packet if that packet also contains one or more extension elements, as defined here.  An extension element SHOULD only be present in a packet when needed; the signaling setup of extension elements indicates only that those elements can be present in some packets, not that they are in fact present in all (or indeed, any) packets.</t>
					<t>

Some general considerations for getting the header extensions
   delivered to the receiver:</t>
					<t>
						<list style="numbers">
							<t> The probability for packet loss and burst loss determine how many
       repetitions of the header extensions will be required to reach a
       targeted delivery probability, and if burst loss is likely, what
       distribution would be needed to avoid getting all repetitions of
       the header extensions lost in a single burst.
</t>
							<t> If a set of packets are all needed to enable decoding, there is
       commonly no reason for including the header extension in all of
       these packets, as they share fate.  Instead, at most one instance
       of the header extension per independently decodable set of media
       data would be a more efficient use of the bandwidth.
    </t>
							<t> How early the Header Extension item information is needed, from the first
       received RTP data or only after some set of packets are received,
       can guide if the header extension(s) should be in all of the
       first N packets or be included only once per set of packets, for
       example once per video frame.
  </t>
							<t>The use of RTP level robustness mechanisms, such as RTP
       retransmission <xref target="RFC4588"/>, or Forward Error Correction, e.g.,
       <xref target="RFC5109"/> may treat packets differently from a robustness
       perspective, and header extensions should be added to
       packets that get a treatment corresponding to the relative
       importance of receiving the information.
   </t>
						</list>
					</t>
					<t>
   

  
  

   As a summary, the number of header extension transmissions should be
   tailored to a desired probability of delivery taking the receiver
   population size into account.  For the very basic case, N repetitions
   of the header extensions should be sufficient, but may not be
   optimal.  N is selected so that the header extension target delivery
   probability reaches 1-P^N, where P is the probability of packet loss.
   For point to point or small receiver populations, it might also be
   possible to use feedback, such as RTCP, to determine when the
   information in the header extensions has reached all receivers and
   stop further repetitions.  Feedback that can be used includes the
   RTCP XR Loss RLE report block <xref target="RFC3611"/>, which will indicate
   successful delivery of particular packets.  If the RTP/AVPF Transport
   Layer Feedback Messages for generic NACK <xref target="RFC4585"/> is used, it can
   indicate the failure to deliver an RTP packet with the header
   extension, thus indicating the need for further repetitions.  The
   normal RTCP report blocks can also provide an indicator of successful
   delivery, if no losses are indicated for a reporting interval
   covering the RTP packets with the header extension.  Note that loss
   of an RTCP packet reporting on an interval where RTP header extension
   packets were sent, does not necessarily mean that the RTP header
   extension packets themselves were lost.



</t>
				</section>
				<section title="Header Extension Type Considerations">
					<t>Each extension element in a packet has a local identifier (ID) and a length.  The local identifiers present in the stream MUST have been negotiated or defined out-of-band.  There are no static allocations of local identifiers.  Each distinct extension MUST have a unique ID.  The ID value 0 is reserved for padding and MUST NOT be used as a local identifier.</t>
					<t>An extension element with an ID value equal 0 MUST NOT have len field greater than 0.  If such an extension element is encountered, its length field MUST be ignored, processing of the entire extension MUST terminate at that point, and only the extension elements present prior to the element with ID 0 and len field greater than 0 SHOULD be considered.</t>
					<t>There are two variants of the extension: one-byte and two-byte headers.  Since it is expected that (a) the number of extensions in any given RTP session is small and (b) the extensions themselves are small, the one-byte header form is preferred and MUST be supported by all receivers. A stream MUST contain only one-byte or only two-byte headers unless it is known that all recipients support mixing, either by SDP Offer/Answer <xref target="RFC3264"/> negotiation (see section 6) or by out-of-band knowledge. Each RTP packet with an RTP header extension following this specification will indicate if it contains one or two byte header extensions through the use of the "defined by profile" field. Extension element types that do not match the header extension format, i.e. one- or two-byte, MUST NOT be used in that RTP packet. 
Transmitters SHOULD NOT use the two-byte form when all extensions are small enough for the one-byte header form. Transmitters that intend to send the two-byte form SHOULD negotiate the use of IDs above 14 if they want to let the Receivers know that they intend to use two-byte form, for example if the RTP header extension is longer than 16 bytes. A transmitter may be aware that an intermediary may add RTP header extensions; in this case the transmitter SHOULD use two-byte form.</t>
					<t>A sequence of extension elements, possibly with padding, forms the header extension defined in the RTP specification. There are as many extension elements as fit into the length as indicated in the RTP header extension length.  Since this length is signaled in full 32-bit words, padding bytes are used to pad to a 32-bit boundary. The entire extension is parsed byte-by-byte to find each extension element (no alignment is needed), and parsing stops at the earlier of the end of the entire header extension, or in "one-byte headers only" case, on encountering an identifier with the reserved value of 15.</t>
					<t>In both forms, padding bytes have the value of 0 (zero). They MAY be placed between extension elements, if desired for alignment, or after the last extension element, if needed for padding. A padding byte does not supply the ID of an element, nor the length field. When a padding byte is found, it is ignored and the parser moves on to interpreting the next byte.</t>
					<t>Note carefully that the one-byte header form allows for data lengths between 1 and 16 bytes, by adding 1 to the signaled length value (thus, 0 in the length field indicates 1 byte of data follows).  This allows for the important case of 16-byte payloads. This addition is not performed for the two-byte headers, where the length field signals data lengths between 0 and 255 bytes.</t>
					<t>Use of RTP header extensions will reduce the efficiency of RTP header compression, since the header extension will be sent uncompressed unless the RTP header compression module is updated to recognize the extension header. If header extensions are present in some packets, but not in others, this can also reduce compression efficiency by requiring an update to the fixed header to be conveyed when header extensions start or stop being sent. The interactions of the RTP header extension and header compression is explored further in <xref target="RFC2508"/> and <xref target="RFC3095"/>.</t>
				</section>
			</section>
			<section title="One-Byte Header">
				<t>In the one-byte header form of extensions, the 16-bit value
required by the RTP specification for a header extension, labeled in
the RTP specification as "defined by profile", MUST have the fixed bit
pattern 0xBEDE (the pattern was picked for the trivial reason that the first version of this specification was written on May 25th the feast day of the Venerable Bede).</t>
				<figure>
					<preamble>Each extension element MUST start with a byte containing an ID and a length:</preamble>
					<artwork>
    0               
    0 1 2 3 4 5 6 7 
   +-+-+-+-+-+-+-+-+
   |  ID   |  len  |
   +-+-+-+-+-+-+-+-+

</artwork>
				</figure>
				<t>The 4-bit ID is the local identifier of this element in the range 1-14 inclusive. In the signaling section, this is referred to as the valid range.</t>
				<t>The local identifier value 15 is reserved for future extension and MUST NOT be used as an identifier.  If the ID value 15 is encountered, its length field MUST be ignored, processing of the entire extension MUST terminate at that point, and only the extension elements present prior to the element with ID 15 SHOULD be considered.</t>
				<t>The 4-bit length is the number minus one of data bytes of this header extension element following the one-byte header.  Therefore, the value zero in this field indicates that one byte of data follows, and a value of 15 (the maximum) indicates element data of 16 bytes. (This permits carriage of 16-byte values, which is a common length of labels and identifiers, while losing the possibility of zero-length values -- which would often be padded anyway.)</t>
				<figure>
					<preamble>An example header extension, with three extension elements, and some padding follows:</preamble>
					<artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       0xBE    |    0xDE       |           length=3            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  ID   | L=0   |     data      |  ID   |  L=1  |   data...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         ...data   |    0 (pad)    |    0 (pad)    |  ID   | L=3   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          data                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
				</figure>
			</section>
			<section title="Two-Byte Header">
				<t>In the two-byte header form, the 16-bit value defined by the RTP specification for a header extension, labeled in the RTP specification as "defined by profile", is defined as shown below.</t>
				<figure>
					<artwork>
    0                   1           
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         0x100         |appbits|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
				</figure>
				<t>The appbits field is 4 bits that are application-dependent and MAY be defined to be any value or meaning, and are outside the scope of this specification.  For the purposes of signaling, this field is treated as a special extension value assigned to the local identifier 256. If no extension has been specified through configuration or signaling for this local identifier value 256, the appbits field SHOULD be set to all 0s by the sender and MUST be ignored by the receiver.</t>
				<t>Each extension element starts with a byte containing an ID and a byte containing a length:</t>
				<figure>
					<artwork>
    0                   1                   
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       ID      |     length    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
				</figure>
				<t>The 8-bit ID is the local identifier of this element in the range 1-255 inclusive. In the signaling section, the range 1-256 is referred to as the valid range, with the values 1-255 referring to extension elements, and the value 256 referring to the 4-bit field 'appbits' (above). Note that there is one ID space for both one-byte and two-byte form. This means that the lower values (1-14) can be used in the 4-bit ID field in the one-byte header format with the same meanings.</t>
				<t>The 8-bit length field is the length of extension data in bytes not including the ID and length fields. The value zero indicates there is no data following.</t>
				<figure>
					<preamble>An example header extension, with three extension elements, and some padding follows:</preamble>
					<artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       0x10    |    0x00       |           length=3            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ID       |     L=0       |     ID        |     L=1       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       data    |    0 (pad)    |       ID      |      L=4      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          data                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
				</figure>
			</section>
		</section>
		<section title="SDP Signaling Design">
			<t>The indication of the presence of this extension, and the mapping of local identifiers used in the header extension to a larger namespace, MUST be performed out-of-band, for example, as part of an SDP Offer/Answer <xref target="RFC3264"/>. This section defines such signaling in SDP.</t>
			<t>A usable mapping MUST use IDs in the valid range, and each ID in this range MUST be used only once for each media (or only once if the mappings are session level). Mappings that do not conform to these rules MAY be presented, for instance, during SDP Offer/Answer <xref target="RFC3264"/> negotiation as described in the next section, but remapping to conformant values is necessary before they can be applied.</t>
			<t>Each extension is named by a URI.  That URI MUST be absolute, and precisely identifies the format and meaning of the extension.  URIs that contain a domain name SHOULD also contain a month-date in the form mmyyyy.  The definition of the element and assignment of the URI MUST have been authorized by the owner of the domain name on or very close to that date.  (This avoids problems when domain names change ownership.)  If the resource or document defines several extensions, then the URI MUST identify the actual extension in use, e.g., using a fragment or query identifier (characters after a '#' or '?' in the URI).</t>
			<t>Rationale:  the use of URIs provides for a large, unallocated space, and gives documentation on the extension. The URIs do not have to be de-referencable, in order to permit confidential or experimental use, and to cover the case when extensions continue to be used after the organization that defined them ceases to exist.</t>
			<t>An extension URI with the same attributes MUST NOT appear more than once applying to the same stream, i.e., at session level or in the declarations for a single stream at media level. (The same extension can, of course, be used for several streams, and can appear with different extensionattributes for the same stream.)</t>
			<t>For extensions defined in RFCs, the URI used SHOULD be a URN starting "urn:ietf:params:rtp-hdrext:" and followed by a registered, descriptive name.</t>
			<t>The registration requirements are detailed in the IANA Considerations section, below.</t>
			<t>An example (this is only an example), where 'avt-example-metadata' is the hypothetical name of a header extension, might be:</t>
			<t>
				<list>
					<t>urn:ietf:params:rtp-hdrext:avt-example-metadata</t>
				</list>
			</t>
			<t>An example name not from the IETF (this is only an example) might be:</t>
			<t>
				<list>
					<t>http://example.com/082005/ext.htm#example-metadata</t>
				</list>
			</t>
			<t>The mapping MAY be provided per media stream (in the media-level
section(s) of SDP, i.e., after an "m=" line) or
globally for all streams (i.e., before the first
"m=" line, at session level).  The definitions
MUST be either all session level or all media level;  it is not
permitted to mix the two styles.  In addition, as noted above, the IDs
used MUST be unique in each media section of the SDP, or unique in the
session for session-level SDP declarations.</t>
			<t>Each local identifier potentially used in the stream is mapped to an extension identified by a URI using an attribute of the form:</t>
			<t>
				<list>
					<t>a=extmap:&lt;value&gt;["/"&lt;direction&gt;] &lt;URI&gt; &lt;extensionattributes&gt;</t>
				</list>
			</t>
			<t>where &lt;URI&gt; is a URI, as above, &lt;value&gt; is the local identifier (ID) of this extension and is an integer in the valid range (0 is reserved for padding in both forms, and 15 is reserved in the one-byte header form, as noted above), and &lt;direction&gt; is one of "sendonly", "recvonly", "sendrecv", or "inactive" (without the quotes) with relation to the device being configured.</t>
			<t>The formal BNF syntax is presented in a later section of this specification.</t>
			<t>Example:</t>
			<t>
				<list>
					<t>a=extmap:1 http://example.com/082005/ext.htm#ttime</t>
					<t>a=extmap:2/sendrecv http://example.com/082005/ext.htm#xmeta short</t>
				</list>
			</t>
			<t>When SDP signaling is used for the RTP session, it is the presence of the 'extmap' attribute(s) that is diagnostic that this style of header extensions is used, not the magic number ("BEDE" or "100") indicated above.</t>
		</section>
		<section title="SDP Signaling for support of mixed one byte and two bytes header extensions.">
			<t>
		In order to allow for backward interoperability with systems that do not support mixing of one byte and two bytes header extensions this document defines the "a=extmap-allow-mixed" Session Description Protocol
   (SDP) <xref target="RFC4566"/> attribute to indicate if the participant is
   capable of supporting this new mode.  The attribute takes no value. This attribute can be used at the session or media levels.
   A participant that proposes the use of this mode SHALL
   itself support the reception of mixed one byte and two bytes header extensions.</t>
			<t>
   If SDP Offer/Answer <xref target="RFC3264"/> is supported and used,the negotiation for  mixed one byte and two bytes extension MUST be negotiated using SDP Offer/Answer <xref target="RFC3264"/>. In the absence of negotiations using SDP Offer/Answer, for example when declarative SDP is used, mixed headers MUST NOT occur unless the transmitter has some (out of band) knowledge that all potential recipients support this mode.  </t>
			<t>
The formal definition of this attribute is:</t>
			<t>
				<list hangIndent="5">
					<t>  Name: extmap-allow-mixed</t>
					<t> Value: none</t>
					<t>   Usage Level: session, media</t>
					<t>  Charset Dependent: no</t>
					<t>   Example:</t>
					<t>  a=extmap-allow-mixed</t>
				</list>
			</t>
			<t>  When doing SDP Offer/Answer <xref target="RFC3264"/> an offering client that wishes
   to use both one and two bytes extensions MUST include the attribute "a= extmap-allow-mixed "
   in the SDP offer.  If "a= extmap-allow-mixed " is present in the offer SDP, the
   answerer that supports this mode and wishes to use it
   SHALL include the "a=extmap-allow-mixed " attribute in the answer. In the cases
    where the attribute has been excluded, both clients SHALL NOT use mixed one bytes and two bytes extensions in the same RTP stream but MAY use one-byte or two-bytes form exclusively (see section 4.1.2).
		</t>
			<t>When used in <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/> this attribute is specified as identical category for the <xref target="I-D.ietf-mmusic-sdp-mux-attributes"/>. This allows for only a subset of the m-lines in the bundle group to offer extmap-allow-mixed. When an answerer supporting the extmap-allow-mix attribute receives an offer where only some of the m-lines in the bundle group include the extmap-allow-mixed attribute, the answerer MUST receive this offer and support mixed one-byte and two-bytes only for those m-lines. Transmitters MUST only send RTP header extensions using mixed on those RTP streams originating from those media sources (m=) blocks that includes extmap-allow-mixed, and are RECOMMENDED to support receiving mixed on all RTP streams being received in an RTP session where at least one bundled m= block is indicating extmap-allow-mixed. 

		</t>
		</section>
		<section title="SDP Offer/Answer">
			<t>The simple signaling described above for the extmap attribute MAY be enhanced in an SDP Offer/Answer <xref target="RFC3264"/> context, to permit:</t>
			<t>
				<list style="symbols">
					<t>asymmetric behavior (extensions sent in only one direction),</t>
					<t>the offer of mutually exclusive alternatives, or</t>
					<t>the offer of more extensions than can be sent in a single session.</t>
				</list>
			</t>
			<t>A direction attribute MAY be included in an extmap;  without it, the direction implicitly inherits, of course, from the stream direction, or is "sendrecv" for session-level attributes or extensions of "inactive" streams.    The direction MUST be one of "sendonly", "recvonly", "sendrecv", or "inactive" as specified in <xref target="RFC3264"/>
			</t>
			<t>Extensions, with their directions, MAY be signaled for an "inactive" stream. It is an error to use an extension direction incompatible with the stream direction (e.g., a "sendonly" attribute for a "recvonly" stream).</t>
			<t>If an offer or answer contains session-level mappings (and hence no media-level mappings), and different behavior is desired for each stream, then the entire set of extension map declarations MAY be moved into the media-level section(s) of the SDP. (Note that this specification does not permit mixing global and local declarations, to make identifier management easier.)</t>
			<t>If an extension map is offered as "sendrecv", explicitly or implicitly, and asymmetric behavior is desired, the SDP answer MAY be changed
<!--[rfced] Could the above "modified" be made "changed" so as to avoid "modified to modify"?  -->
 to modify or add direction qualifiers for that extension.</t>
			<t>If an extension is marked as "sendonly" and the answerer desires to receive it, the extension MUST be marked as "recvonly" in the SDP answer. An answerer that has no desire to receive the extension or does not understand the extension SHOULD remove it from the SDP answer. An answerer MAY want to respond that he supports the extension and does not want to receive it at the moment but may offer to receive it in a future offer, will mark the extension as "inactive"</t>
			<t>If an extension is marked as "recvonly" and the answerer desires to send it, the extension MUST be marked as "sendonly" in the SDP answer. An answerer that has no desire to, or is unable to, send the extension SHOULD remove it from the SDP answer. An answerer MAY want to respond that he support this extension yet has no intention of sending it now but may offer to send it in a future offer by marking the extension as "inactive"</t>
			<t>Local identifiers in the valid range inclusive in an offer or answer must not be used more than once per media section (including the session-level section). The local identifiers MUST be unique in an RTP session and the same identifier MUST be used for the same offered  extension in the answer. A session update MAY change the direction qualifiers of extensions under use. A session update MAY add or remove extension(s). Identifiers values in the valid range MUST NOT be altered (remapped). </t>
			<t>Note that, under this rule, the same local identifier cannot be used for two extensions for the same media, even when one is "sendonly" and the other "recvonly", as it would then be impossible to make either of them sendrecv (since re-numbering is not permitted either).</t>
			<t>If a party wishes to offer mutually exclusive alternatives, then multiple extensions with the same identifier in the extended range 4096-4351 MAY be offered;  the answerer SHOULD select at most one of the offered extensions with the same identifier, and remap it to a free identifier in the valid range, for that extension to be usable.</t>
			<t>Similarly, if more extensions are offered than can be fit in the valid range, identifiers in the range 4096-4351 MAY be offered; the answerer SHOULD choose those that are desired, and remap them to a free identifier in the valid range.</t>
			<t>An answerer may copy an extmap for an identifier in the extended
   range into the answer to indicate to the offerer that it supports
   that extension.  Of course, such an extension cannot be used, since
   there is no way to specify them in an extension header.  If needed,
   the offerer or answerer can update the session to assign a valid
   identifier to that extension URI.
</t>
			<t>Rationale: the range 4096-4351 for these negotiation identifiers is deliberately restricted to allow expansion of the range of valid identifiers in future.</t>
			<t>Either party MAY include extensions in the stream other than those negotiated, or those negotiated as "inactive", for example, for the benefit of intermediate nodes. Only extensions that appeared with an identifier in the valid range in SDP originated by the sender can be sent.</t>
			<t>Example (port numbers, RTP profiles, payload IDs and rtpmaps, etc. all omitted for brevity):</t>
			<t>The offer:</t>
			<figure>
				<artwork>
a=extmap:1 URI-toffset
a=extmap:14 URI-obscure
a=extmap:4096 URI-gps-string
a=extmap:4096 URI-gps-binary
a=extmap:4097 URI-frametype
m=video
a=sendrecv
m=audio 
a=sendrecv
</artwork>
			</figure>
			<t>The answerer is interested in receiving GPS in string format only on video, but cannot send GPS at all.  It is not interested in transmission offsets on audio, and does not understand the URI-obscure extension. It therefore moves the extensions from session level to media level, and adjusts the declarations:</t>
			<figure>
				<artwork>
m=video 
a=sendrecv
a=extmap:1 URI-toffset
a=extmap:2/recvonly URI-gps-string
a=extmap:3 URI-frametype
m=audio 
a=sendrecv
a=extmap:1/sendonly URI-toffset
</artwork>
			</figure>
			<t> 
When using <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/> to bundle multiple m-lines the extmap attribute falls under the special category of <xref target="I-D.ietf-mmusic-sdp-mux-attributes"/>. All the m-lines in a bundle group are considered to be part of the same local identifier (ID) space.  If an RTP header extension, i.e. a particular extension URI and configuration using &lt;extensionattributes&gt;, is offered in multiple m-lines that are part of the same bundle group it MUST use the same ID in all of these m-lines. Each m-line in a bundle group can include different RTP header extensions allowing for example audio and video sources to use different sets of RTP header extensions.
It SHALL be assumed that for any RTP header extension, difference in configuration using any of the &lt;extensionattributes&gt; is important and need to be preserved to any receiver, thus requiring assignment of different IDs. Any RTP header extension that does not match this assumption MUST explicitly provide rules for what are compatible configurations that can be sent with the same ID. The directionality of the RTP header extensions in each m-line of the bundle group are handled as the non-bundled case. This allows for specifying different directionality for each of the repeated extension URI in bundled group.


			
			
			</t>
		</section>
		<section title="BNF Syntax">
			<t>The syntax definition below uses ABNF according to <xref target="RFC5234"/>. The syntax element 'URI' is defined in <xref target="RFC3986"/> (only absolute URIs are permitted here). The syntax element 'extmap' is an attribute as defined in <xref target="RFC4566"/>, i.e., "a=" precedes the extmap definition.  Specific extensionattributes are defined by the specification that defines a specific extension name;  there can be several.</t>
			<figure>
				<artwork>
     
    Name: extmap

    Value: extmap-value

    Syntax:

     extmap-value = mapentry SP extensionname
                    [SP extensionattributes]

     mapentry = "extmap:" 1*5DIGIT ["/" direction]

     extensionname = URI

     extensionattributes = byte-string

     direction = "sendonly" / "recvonly" / "sendrecv" / "inactive"

     URI = &lt;Defined in RFC 3986&gt;

     byte-string = &lt;Defined in RFC 4566&gt;

     SP = &lt;Defined in RFC 5234&gt;

     DIGIT = &lt;Defined in RFC 5234&gt;
</artwork>
			</figure>
		</section>
		<section title="Security Considerations">
			<t>   This document defines only a place to transmit information; the security
   implications of each of the extensions must be discussed with those
   extensions.
</t>
			<t>Extensions usage is negotiated using <xref target="RFC3264"/> so integrity protection and end-to-end authentication MUST be implemented. The security considerations of <xref target="RFC3264"/> MUST be followed, to prevent, for example, extension usage blocking.
</t>
			<t>Header extensions have the same security coverage as the RTP header itself. When Secure Real-time Transport Protocol (SRTP) <xref target="RFC3711"/> is used to protect RTP sessions, the RTP payload can be both encrypted and integrity protected, while the RTP header is either unprotected or integrity protected. In order to prevent DOS attacks, for example, by changing the header extension, integrity protection SHOULD be used. Lower layer security protection like DTLS<xref target="RFC6347"/> MAY be used. RTP header extensions can
   carry sensitive information for which participants in multimedia
   sessions want confidentiality. RFC6904 <xref target="RFC6904"/>  provides a mechanism,
   extending the mechanisms of SRTP, to selectively encrypt RTP header
   extensions in SRTP.
</t>
			<t>The RTP application designer needs to consider their security needs, that includes cipher strength for SRTP packets in general and what that means for the integrity and confidentiality of the RTP header extensions. As defined by RFC6904 <xref target="RFC6904"/> the encryption stream cipher for the header extension is dependent on the chosen SRTP cipher. 


</t>
			<t>Other security options for securing RTP are discussed in <xref target="RFC7201"/>.
</t>
		</section>
		<section title="IANA Considerations">
			<t>This document updates the IANA consideration to reference this document and adds a new SDP attribute in section 10.3</t>
			<t>Note to IANA : change RFCxxxx to this RFC number and remove the note.
</t>
			<section title="Identifier Space for IANA to Manage">
				<t>The mapping from the naming URI form to a reference to a specification is managed by IANA.  Insertion into this registry is under the requirements of "Expert Review" as defined in <xref target="RFC8126"/>.</t>
				<t>The IANA will also maintain a server that contains all of the registered elements in a publicly accessible space.</t>
				<t>Here is the formal declaration to comply with the IETF URN Sub-namespace specification <xref target="RFC3553"/>.</t>
				<t>
					<list style="symbols">
						<t>Registry name:  RTP Compact Header Extensions</t>
						<t>Specification: RFC 5285 and RFCs updating
RFC 5285.</t>
						<t>Information required:<list style="letters">
								<t>The desired extension naming URI</t>
								<t>A formal reference to the publicly available specification</t>
								<t>A short phrase describing the function of the extension</t>
								<t>Contact information for the organization or person making the registration</t>
							</list>
			For extensions defined in RFCs, the URI SHOULD be of the form urn:ietf:params:rtp-hdrext:, and the formal reference is the RFC number of the RFC documenting the extension.</t>
						<t>Review process: Expert review is REQUIRED. The expert review SHOULD check the following requirements:
			<list style="numbers">
								<t>that the specification is publicly available;</t>
								<t>that the extension complies with the requirements of RTP, and this specification, for header extensions (specifically, that the header extension can be ignored or discarded without breaking the RTP layer);
</t>
								<t>that the extension specification is technically consistent (in itself and with RTP), complete, and comprehensible;</t>
								<t>that the extension does not duplicate functionality in existing IETF specifications (including RTP itself), or other extensions already registered;</t>
								<t>that the specification contains a security analysis regarding the content of the header extension;</t>
								<t>that the extension is generally applicable, for example point-to-multipoint safe, and the specification correctly describes limitations if they exist; and</t>
								<t>that the suggested naming URI form is appropriately chosen and unique.</t>
								<t>That for <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/> multiplexed m-lines, any RTP header extension with difference in configurations of &lt;extensionattributes&gt; that do not require assignment of different IDs, MUST explicitly indicate this and provide rules for what are compatible configurations that can be sent with the same ID.</t>
							</list>
						</t>
						<t>Size and format of entries: a mapping from a naming URI string to a formal reference to a publicly available specification, with a descriptive phrase and contact information.</t>
						<t>Initial assignments: none.</t>
					</list>
				</t>
			</section>
			<section title="Registration of the SDP extmap Attribute">
				<t>IANA is requested to update the registration of the extmap SDP <xref target="RFC4566"/> attribute.</t>
				<t>
					<list style="symbols">
						<t>Contact Name and email address: IETF, contacted via mmusic@ietf.org, or a successor address designated by IESG
    Attribute Name: extmap</t>
						<t>Attribute Syntax: See section 8 of [RFCXXXX].</t>
						<t>Attribute Semantics: The details of appropriate values are given in [RFC XXXX].</t>
						<t>Usage Level: Media or session level.</t>
						<t>Charset Dependent: No.</t>
						<t>Purpose: defines the mapping from the extension numbers used in packet headers into extension names.</t>
						<t>O/A Procedures: See section 7 of [RFCXXXX].</t>
						<t>Mux Category: Special.</t>
						<t>Reference: [RFCXXXX]</t>
					</list>
				</t>
			</section>
			<section title="Registration of the SDP extmap-allow-mixed Attribute">
				<t>The IANA is requested to register one new SDP attribute:</t>
				<t>
					<list style="symbols">
						<t>Contact Name and email address: IETF, contacted via mmusic@ietf.org, or a successor address designated by IESG.</t>
						<t>Attribute Name: extmap-allow-mixed.</t>
						<t>Attribute Syntax: See section 6 of [RFCXXXX].</t>
						<t>Attribute Semantics: See section 6 of [RFCXXXX].</t>
						<t>Attribute Value: None.</t>
						<t>Usage Level: Media or session level.</t>
						<t>Charset Dependent: no.</t>
						<t>Purpose: Negotiate the use of One and Two bytes in the same RTP stream.</t>
						<t>O/A Procedures: See section 6 of [RFCXXXX].</t>
						<t>Mux Category: Identical</t>
						<t>Reference: [RFCXXXX]</t>
					</list>
				</t>
			</section>
		</section>
		<section title="Changes from RFC5285">
			<t>The major motivation for updating <xref target="RFC5285"/> was to allow having one byte and two bytes RTP header extensions in the same RTP stream (but not in the same RTP packet). The support for this case is negotiated using a new SDP attribute “extmap-allow-mixed” specified in this document.</t>
			<t>The other major change is to update the requirement from the RTP specification <xref target="RFC3550"/> and <xref target="RFC5285"/> that the header extension "is designed so that the header extension MAY be ignored". This is described in section 4.1.</t>
			<t>The transmission consideration section (4.1.1) adds more text to clarify when and how many times to send the RTP header extension to provide higher probability of delivery</t>
			<t>>The security section was expanded</t>
			<t>The rest of the changes are editorial. 

</t>
		</section>
		<section title="Acknowledgments">
			<t>Both Brian Link and John Lazzaro provided helpful comments
on an initial draft of this document.  Colin Perkins was helpful in reviewing and dealing with the details.  The use of URNs for IETF-defined extensions was suggested by Jonathan Lennox, and Pete Cordell was instrumental in improving the padding wording.  Dave Oran provided feedback and text in the review.  Mike Dolan contributed the two-byte header form.  Magnus Westerlund and Tom Taylor were instrumental in managing the registration text.</t>
		</section>
	</middle>
	<back>
		<references title="Normative References">
    	&RFC2119;
    		&RFC6904;
    		&RFC3264;
    		
    		&RFC2508;
    		&RFC3095;
    		
    		&RFC3711;
    		&RFC3986;
    		&RFC5234;
    		&RFC4566;


		</references>
		<references title="Informative References">
			&RFC5285;
			&RFC3611;
			&RFC4585;
			&RFC4588;
			&RFC7667;
			&RFC3550;
			&RFC5109;
			&RFC6347;
			&RFC7201;
			&RFC3553;
			&RFC8126;
			 <reference anchor="I-D.ietf-mmusic-sdp-bundle-negotiation">
				<front>
					<title>Negotiating Media Multiplexing Using the Session Description Protocol (SDP)</title>
					<author initials="C" surname="Holmberg" fullname="Christer Holmberg">
						<organization/>
					</author>
					<author initials="H" surname="Alvestrand" fullname="Harald Alvestrand">
						<organization/>
					</author>
					<author initials="C" surname="Jennings" fullname="Cullen Jennings">
						<organization/>
					</author>
					<date month="April" day="12" year="2017"/>
					<abstract>
						<t>This specification defines a new Session Description Protocol (SDP)
   Grouping Framework extension, 'BUNDLE'.  The extension can be used
   with the SDP Offer/Answer mechanism to negotiate the usage of a
   single address:port combination (BUNDLE address) for receiving media,
   referred to as bundled media, specified by multiple SDP media
   descriptions ("m=" lines).

   To assist endpoints in negotiating the use of bundle this
   specification defines a new SDP attribute, 'bundle-only', which can
   be used to request that specific media is only used if bundled.  The
   specification also updates RFC 3264, to allow usage of zero port
   values without meaning that media is rejected.

   There are multiple ways to correlate the bundled RTP packets with the
   appropriate media descriptions.  This specification defines a new
   Real-time Transport Protocol (RTP) source description (SDES) item and
   a new RTP header extension that provides an additional way to do this
   correlation by using them to carry a value that associates the RTP/
   RTCP packets with a specific media description.
</t>
					</abstract>
				</front>
				<seriesInfo name="Internet-Draft" value="draft-ietf-mmusic-sdp-bundle-negotiation-38"/>
				<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-sdp-bundle-negotiation-38.txt"/>
			</reference>
			<reference anchor="I-D.ietf-mmusic-sdp-mux-attributes">
				<front>
					<title>A Framework for SDP Attributes when Multiplexing</title>
					<author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar">
						<organization/>
					</author>
					<date month="December" day="19" year="2016"/>
					<abstract>
						<t>
The purpose of this specification is to provide a framework for analyzing the multiplexing characteristics of Session Description Protocol (SDP) attributes when SDP is used to negotiate the usage of single 5-tuple for sending and receiving media associated with multiple media descriptions. This specification also categorizes the existing SDP attributes based on the framework described herein.
</t>
					</abstract>
				</front>
				<seriesInfo name="Internet-Draft" value="draft-ietf-mmusic-sdp-mux-attributes-16"/>
				<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-sdp-mux-attributes-16.txt"/>
			</reference>
		</references>
	</back>
</rfc>
