XEP-0294: Jingle RTP Header Extensions Negotiation

This specification defines an XMPP extension to negotiate the use of the use of RTP Header Extension as defined by RFC 8285 with Jingle RTP sessions
Olivier Crête
© 1999 – 2021 XMPP Standards Foundation. SEE LEGAL NOTICES.


NOTICE: The protocol defined herein is a Stable Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
Standards Track
1.1.2 (2022-08-27)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

This documents specifies how to negotiate the use of the RTP Header Extensions as defined by RFC 8285 [1] with Jingle RTP sessions.

2. Requirements

The Jingle extension defined herein is designed to meet the following requirements:

  1. Enable negotiations of the RTP Header extensions as defined in RFC 8285.
  2. Map these parameters to Session Description Protocol (SDP; see RFC 4566 [2]) to enable interoperability.

3. New elements

This specification defines a new element, <rtp-hdrext/>, that can be inserted in the <description/> element of a XEP-0167 RTP session.

The attributes of the <rtp-hdrext/> element are:

Table 1: rtp-hdrext attributes
Attribute Description Inclusion Possible values
id The ID of the extensions REQUIRED 1-256, 4096-4351
uri The URI that defines the extension REQUIRED Any valid URI
senders Which party is allowed to send the negotiated RTP Header Extensions OPTIONAL (defaults to "both") "initiator", "responder", and "both"

Any type of RTP Header Extension that requires extra parameters in the a=b form can embed <parameter/> elements to describe it. Any other form of parameter can be stored as the 'name' attribute in a parameter element with an empty value.

This specification defines a new element, <extmap-allow-mixed/>, that can be inserted in the <description/> element of a XEP-0167 RTP session. The element has no attributes.

4. Negotiation

RTP header extensions are negotiated along the codecs. They follow the same Offer/Answer mechanism based on SDP Offer/Answer. The initiator signals which RTP header extensions it wants to send or receive in the the <session-initiate/> iq stanza. If the responder does not understand the type of header extensions, it MUST remove the element from the reply. If the responder does not wish to provide or receive some kind of RTP header extension, it MUST remove the relevant element from the reply. It MUST then send the remaining elements it wants to keep as-is without modifying them in the <session-accept/> iq stanza.

It MUST NOT add any <rtp-hdrext/> element that was not offered by the initiator. The responder MAY downgrade the senders field from "both" to "initator" or "responder", but MUST NOT modify it if it is "initator" or "responder".

The usage of the <extmap-allow-mixed/> is governed by the SDP Offer/Answer mechanism as well.

Example negotiation where the initiator offers to use the timestamp offset header extension as defined in RFC 5450 [3] and also the requests synchronisation metadata header extension (RFC 6051 [4]) with either the 56-bit or the 64-bit format.

Example 1. Initiator sends description inside session-initiate
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <payload-type id='96' name='THEORA' clockrate='90000'/>
  <extmap-allow-mixed xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>

Example reply where the responder accepts the timestamp offset and the 56-bit synchronisation metadata header extensions as well as the <extmap-allow-mixed/>.

Example 2. Reponder sends description inside session-accept
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <payload-type id='96' name='THEORA' clockrate='90000'/>

Another reply to the same request where the responder accepts only the synchronisation data header extension with the 64-bit format.

Example 3. Responder sends description inside session-accept with only the synchronisation data accepted
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <payload-type id='96' name='THEORA' clockrate='90000'/>

5. Mapping to Session Description Protocol

The <rtp-hdrext/> element maps to the "a:extmap=" SDP line defined in RFC 8285. The ID is mapped to the 'id' attribute, the direction to the 'senders' attribute and the URI to the 'uri' attribute.

The <extmap-allow-mixed/> element maps to the "a=extmap-allow-mixed" SDP line defined in RFC 8285. Note that a session-level line might need to be mapped to all <description/> elements.

Example conversion of an incomplete SDP sample fragment taken from RFC 8285 section 7 into equivalent XMPP:

Example 4. SDP fragment
a=extmap:1 URI-toffset
a=extmap:2/recvonly URI-gps-string
a=extmap:3 URI-frametype
Example 5. The same description in XMPP format
<description xmlns='urn:xmpp:jingle:apps:rtp:1' media='video'>
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <rtp-hdrext xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'
  <extmap-allow-mixed xmlns='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>

6. Determining support

To advertise its support for Generic Header extensions in Jingle RTP Sessions, when replying to Service Discovery (XEP-0030) [5] information requests an entity MUST return the following features:

  1. URNs for any version of this protocol that the entity supports -- e.g., "urn:xmpp:jingle:apps:rtp:rtp-hdrext:0" for the current version

An example follows:

Example 6. Service discovery information request
    <iq from='romeo@montague.lit/orchard'
      <query xmlns='http://jabber.org/protocol/disco#info'/>
Example 7. Service discovery information response
    <iq from='juliet@capulet.lit/balcony'
      <query xmlns='http://jabber.org/protocol/disco#info'>
	<feature var='urn:xmpp:jingle:1'/>
	<feature var='urn:xmpp:jingle:apps:rtp:1'/>
	<feature var='urn:xmpp:jingle:apps:rtp:video'/>
	<feature var='urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'/>

7. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA).

8. XMPP Registrar Considerations

8.1 Protocol Namespaces

This specification defines the following XML namespaces:

The XMPP Registrar [6] includes the foregoing namespaces in its registry at <https://xmpp.org/registrar/namespaces.html>, as governed by XMPP Registrar Function (XEP-0053) [7].

8.2 Namespace Versioning

If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.

9. XML Schemas

<?xml version='1.0' encoding='UTF-8'?>


      The protocol documented by this schema is defined in
      XEP-0294: http://www.xmpp.org/extensions/xep-0294.html

  <xs:element name='rtp-hdrext'>
        <xs:element name='parameter'
      <xs:attribute name='id' type='xs:unsignedShort' use='required'/>
      <xs:attribute name='uri' type='xs:string' use='required'/>
      <xs:attribute name='senders'
          <xs:restriction base='xs:NCName'>
            <xs:enumeration value='both'/>
            <xs:enumeration value='initiator'/>
            <xs:enumeration value='none'/>
            <xs:enumeration value='responder'/>

  <xs:complexType name='parameterElementType'>
      <xs:extension base='empty'>
        <xs:attribute name='name' type='xs:string' use='required'/>
        <xs:attribute name='value' type='xs:string' use='optional'/>


10. Acknowledgements

Thanks to Youness Alaoui for his feedback.


Appendix A: Document Information

XMPP Standards Foundation
Standards Track
Last Updated
Approving Body
XMPP Council
XEP-0167, RFC 8285
Superseded By
Short Name
Source Control

This document in other formats: XML  PDF

Appendix B: Author Information

Olivier Crête


This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).


Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

There exists a special venue for discussion related to the technology described in this document: the <jingle@xmpp.org> mailing list.

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/about/discuss.shtml> for a complete list.

Given that this XMPP Extension Protocol normatively references IETF technologies, discussion on the <xsf-ietf@xmpp.org> list might also be appropriate.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. RFC 8285: A General Mechanism for RTP Header Extensions <http://tools.ietf.org/html/rfc8285>.

2. RFC 4566: SDP: Session Description Protocol <http://tools.ietf.org/html/rfc4566>.

3. RFC 5450: Transmission Time Offsets in RTP Streams <http://tools.ietf.org/html/rfc5450>.

4. RFC 6051: Rapid Synchronisation of RTP Flows <http://tools.ietf.org/html/rfc6051>.

5. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

6. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

7. XEP-0053: XMPP Registrar Function <https://xmpp.org/extensions/xep-0053.html>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 1.1.2 (2022-08-27)
    Fix example description and attribute name of 'parameter' element as specified by XML schema
  2. Version 1.1.1 (2021-10-23)

    Strenghten the restriction on the 'id' attribute in the schema by making it xs:unsignedShort.

  3. Version 1.1 (2021-03-28)

    Add mapping for a=extmap-allow-mixed

  4. Version 1.0 (2015-08-11)

    Advanced to Draft per a vote of the XMPP Council.

    XEP Editor (mam)
  5. Version 0.2 (2015-03-25)

    Added XML Schema; Updated based on last call feedback.

  6. Version 0.1 (2011-03-24)

    Initial published version.

  7. Version 0.0.1 (2011-01-10)

    First draft.


Appendix I: Bib(La)TeX Entry

  title = {Jingle RTP Header Extensions Negotiation},
  author = {Crête, Olivier},
  type = {XEP},
  number = {0294},
  version = {1.1.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0294.html},
  date = {2011-01-10/2022-08-27},