XEP-0166: Jingle

This specification defines an XMPP protocol extension for initiating and managing peer-to-peer media sessions between two XMPP entities in a way that is interoperable with existing Internet standards. The protocol provides a pluggable model that enables the core session management semantics to be used for a wide variety of application types (e.g., voice chat, video chat, file sharing) and with a wide variety of transport methods (e.g., TCP, UDP, ICE, application-specific transports).


WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.


Document Information

Series: XEP
Number: 0166
Publisher: XMPP Standards Foundation
Status: Experimental
Type: Standards Track
Version: 0.30
Last Updated: 2008-09-23
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED


Author Information

Scott Ludwig

Email: scottlu@google.com
JabberID: scottlu@google.com

Joe Beda

Email: jbeda@google.com
JabberID: jbeda@google.com

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/

Robert McQueen

Email: robert.mcqueen@collabora.co.uk
JabberID: robert.mcqueen@collabora.co.uk

Sean Egan

Email: seanegan@google.com
JabberID: seanegan@google.com

Joe Hildebrand

Email: jhildebrand@jabber.com
JabberID: hildjj@jabber.org


Legal Notices

Copyright

This XMPP Extension Protocol is copyright (c) 1999 - 2008 by the XMPP Standards Foundation (XSF).

Permissions

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. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

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 out of the use or inability to use 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 may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Discussion Venue

The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.

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

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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.

Conformance Terms

The following 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".


Table of Contents


1. Introduction
2. How It Works
3. Requirements
4. Terminology
    4.1. Glossary
    4.2. Conventions
5. Concepts and Approach
    5.1. Overall Session Management
6. Session Flow
    6.1. Resource Determination
    6.2. Initiation
    6.3. Responder Response
       6.3.1. Acknowledgement
       6.3.2. Errors
    6.4. Negotiation
    6.5. Acceptance
    6.6. Modifying an Active Session
    6.7. Termination
    6.8. Informational Messages
7. Formal Definition
    7.1. Jingle Element
    7.2. Action Attribute
       7.2.1. content-accept
       7.2.2. content-add
       7.2.3. content-modify
       7.2.4. content-remove
       7.2.5. session-accept
       7.2.6. session-info
       7.2.7. session-initiate
       7.2.8. session-terminate
       7.2.9. transport-accept
       7.2.10. transport-info
       7.2.11. transport-replace
       7.2.12. Tie Breaking Related to Jingle Actions
    7.3. Content Element
    7.4. Reason Element
    7.5. Thread Element
8. Error Handling
9. Determining Support
10. Conformance by Using Protocols
    10.1. Application Formats
    10.2. Transport Methods
11. Security Considerations
    11.1. Denial of Service
    11.2. Communication Through Gateways
    11.3. Information Exposure
12. IANA Considerations
13. XMPP Registrar Considerations
    13.1. Protocol Namespaces
    13.2. Namespace Versioning
    13.3. Jingle Application Formats Registry
    13.4. Jingle Transport Methods Registry
14. XML Schemas
    14.1. Jingle
    14.2. Jingle Errors
15. History
16. Acknowledgements
Notes
Revision History


1. Introduction

The purpose of Jingle is to enable one-to-one, peer-to-peer media sessions between XMPP entities, where the negotiation occurs over the XMPP "channel" and the media is exchanged outside the XMPP channel using technologies such as the Real-time Transport Protocol (RTP; RFC 3550 [1]), the User Datagram Protocol (UDP; RFC 768 [2]), and Interactive Connectivity Establishment (ICE) [3].

One target application for Jingle is simple voice chat (see Jingle RTP Sessions [4]). We stress the word "simple". The purpose of Jingle is not to build a full-fledged telephony application that supports call waiting, call forwarding, call transfer, hold music, IVR systems, find-me-follow-me functionality, conference calls, and the like. These features are of interest to some user populations, but adding support for them to the core Jingle layer would introduce unnecessary complexity into a technology that is designed for basic multimedia interaction.

The purpose of Jingle is not to supplant or replace technologies based on Session Initiation Protocol (SIP; RFC 3261 [5]). Because dual-stack XMPP+SIP clients are difficult to build, Jingle was designed as a pure XMPP signalling protocol. However, Jingle is at the same time designed to interwork with SIP so that the millions of deployed XMPP clients can be added onto existing Voice over Internet Protocol (VoIP) networks, rather than limiting XMPP users to a separate and distinct network.

Jingle is designed in a modular way so that developers can easily add support for multimedia session types other than voice chat, such as video chat (see Jingle Video via RTP [6]), application sharing, file sharing, collaborative editing, whiteboarding, and torrent broadcasting. The transport methods are also modular, so that Jingle implementations can use any appropriate media transport (including proprietary methods not standardized through the XMPP Standards Foundation).

2. How It Works

This section provides a friendly introduction to Jingle.

In essence, Jingle enables two XMPP entities (e.g., romeo@montague.lit and juliet@capulet.lit) to set up, manage, and tear down a multimedia session. The negotiation takes place over XMPP, and the media transfer takes place outside of XMPP. The simplest session flow is as follows:

Romeo                         Juliet
  |                             |
  |   session-initiate          |
  |---------------------------->|
  |   ack                       |
  |<----------------------------|
  |   session-accept            |
  |<----------------------------|
  |   ack                       |
  |---------------------------->|
  |   MEDIA SESSION             |
  |<===========================>|
  |   session-terminate         |
  |<----------------------------|
  |   ack                       |
  |---------------------------->|
  |                             |
  

Naturally, more complex scenarios are possible; such scenarios are described in other specifications, such as XEP-0167 for voice chat.

The simplest flow might happen as follows. The example is that of a voice chat offer, where the transport method is Jingle ICE-UDP Transport Method [7].

Example 1. Initiator sends session-initiate

<iq from='romeo@montague.net/orchard'
    id='jingle1'
    to='juliet@capulet.com/balcony'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'>
          action='session-initiate'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
        <payload-type id='96' name='speex' clockrate='16000'/>
        <payload-type id='97' name='speex' clockrate='8000'/>
        <payload-type id='18' name='G729'/>
        <payload-type id='0' name='PCMU' />
        <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
        <payload-type id='98' name='x-ISAC' clockrate='8000'/>
      </description>
      <transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'/>
    </content>
  </jingle>
</iq>
  

Upon receiving the session-initiate stanza, the responder determines whether it can proceed with the negotiation. If there is no error, the responder acknowledges the session initiation request.

Example 2. Responder acknowledges session-initiate

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='result'/>
  

After successful transport negotiation (not shown here), the responder accepts the session by sending a session-accept action to the initiator.

Example 3. Responder definitively accepts the session

<iq from='juliet@capulet.com/balcony'
    id='accept1'
    to='romeo@montague.net/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-accept'
          initiator='romeo@montague.net/orchard'
          responder='juliet@capulet.com/balcony'
          sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
        <payload-type id='97' name='speex' clockrate='8000'/>
        <payload-type id='18' name='G729'/>
      </description>
      <transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'>
        <candidate component='1'
                   foundation='1'
                   generation='0'
                   ip='192.0.2.3'
                   network='1'
                   port='45664'
                   priority='1678246398'
                   protocol='udp'
                   pwd='asd88fgpdd777uzjYhagZg'
                   type='srflx'
                   ufrag='8hhy'/>
      </transport>
    </content>
  </jingle>
</iq>
  

And the initiator acknowledges session acceptance:

Example 4. Initiator acknowledges session acceptance

<iq from='romeo@montague.net/orchard'
    id='accept1'
    to='juliet@capulet.com/balcony'
    type='result'/>
  

The initiator and responder would then exchange media using any of the acceptable codecs.

Eventually, one of the parties (here the responder) will terminate the session.

Example 5. Responder terminates the session

<iq from='juliet@capulet.lit/balcony'
    id='term1'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <no-error/>
      <text>Sorry, gotta go!</text>
    </reason>
  </jingle>
</iq>
  

The other party then acknowledges termination of the session:

Example 6. Initiator acknowledges termination

<iq from='romeo@montague.lit/orchard'
    id='term1'
    to='juliet@capulet.lit/balcony'
    type='result'/>
  

3. Requirements

The protocol defined herein is designed to meet the following requirements:

  1. Make it possible to manage a wide variety of peer-to-peer sessions (including but not limited to voice and video) within XMPP.
  2. When a peer-to-peer connection cannot be negotiated, make it possible to fall back to relayed communications.
  3. Clearly separate the signalling channel (XMPP) from the data channel.
  4. Clearly separate the application formats (e.g., audio) from the transport methods (e.g., RTP).
  5. Make it possible to add, modify, and remove both application types and transport methods in an existing session.
  6. Make it relatively easy to implement support for the protocol in standard Jabber/XMPP clients.
  7. Where communication with non-XMPP entities is needed, push as much complexity as possible onto server-side gateways between the XMPP network and the non-XMPP network.

This document defines the signalling protocol only. Additional documents specify the following:

4. Terminology

4.1 Glossary

Table 1: Glossary

Term Definition
Application Format The data format of the content type being established, which formally declares one purpose of the session (e.g., "voice" or "video"). This is the 'what' of the session (i.e., the bits to be transferred), such as the acceptable codecs when establishing a voice conversation. In Jingle XML syntax the application format is the namespace of the <description/> element.
Component A numbered stream of data that needs to be transmitted between the endpoints for a given content type in the context of a given session. It is up to the transport to negotiate the details of each component. Depending on the content type, multiple components might be needed (e.g., one to transmit an RTP stream and another to transmit RTCP timing information).
Content Type A pair formed by the combination of one application format and one transport method.
Session One or more content types negotiated between two entities. It is delimited in time by a session-initiate action and a session-terminate action. During the lifetime of a session, content types can be added or removed. A session consists of at least one content type at a time.
Transport Method The method for establishing data stream(s) between entities. Possible transports might include ICE-TCP, Raw UDP, inband data, etc. This is the 'how' of the session. In Jingle XML syntax this is the namespace of the <transport/> element. The transport method defines how to transfer bits from one host to another. Each transport method must specify whether it is datagram (thus suitable for applications where some packet loss is tolerable) or stream (thus suitable for applications where packet loss is not tolerable).

4.2 Conventions

In diagrams, the following conventions are used:

5. Concepts and Approach

Jingle consists of three parts, each with its own syntax and semantics:

  1. Overall session management
  2. Application types (the "what")
  3. Transport methods (the "how")

This document defines the semantics and syntax for overall session management. It also provides pluggable "slots" for application formats and transport methods, which are specified in separate documents.

At the most basic level, the process for initial negotiation of a Jingle session is as follows (i.e., the actions that can be generated during the PENDING state):

  1. One user (the "initiator") sends to another user (the "responder") a session initiation request with at least one content definition.
  2. If the responder wants to proceed, it acknowledges the session initiation request by sending an IQ result.
  3. The parties attempt to set up data transmission over the designated transport method as defined in the relevant specification.
  4. Optionally, either party can add or remove content definitions, or change the direction of the media flow.
  5. Optionally, either party can send session-info actions (to inform the other party that it is attempting transport negotiation, that its device is ringing, etc.).
  6. As soon as the responder determines that data can flow over the designated transport, it sends to the initiator a session-accept action.
  7. The parties start sending data over the transport.

After the initial session negotiation has been completed and the session is in the ACTIVE state, the parties can adjust the session definition by sending the content-modify, content-remove, content-add, and transport-replace actions. In addition, certain transport methods allow continued sending of transport-info actions while in the ACTIVE state. And naturally the parties can send session-info actions at any time.

5.1 Overall Session Management

The state machine for overall session management (i.e., the state per Session ID) is as follows:

         o
         |
         | session-initiate
         |
         | +------------------------+
         |/                         |
PENDING  o----------------------+   |
         |  | content-accept,   |   |
         |  | content-add,      |   |
         |  | content-modify,   |   |
         |  | content-remove,   |   |
         |  | session-info,     |   |
         |  | transport-accept, |   |
         |  | transport-info,   |   |
         |  | transport-replace |   |
         |  +-------------------+   |
         |                          |
         | session-accept           |
         |                          |
 ACTIVE  o----------------------+   |
         |  | content-accept,   |   |
         |  | content-add,      |   |
         |  | content-modify,   |   |
         |  | content-remove,   |   |
         |  | session-info,     |   |
         |  | transport-accept, |   |
         |  | transport-info,   |   |
         |  | transport-replace |   |
         |  +-------------------+   |
         |                          |
         +--------------------------+
                                    |
                                    | session-terminate
                                    |
                                    o ENDED
    

As shown, there are three overall session states:

  1. PENDING
  2. ACTIVE
  3. ENDED

The actions related to management of the overall Jingle session are as follows (detailed definitions are provided in under Action Attribute).

6. Session Flow

This section defines the high-level flow of a Jingle session. More detailed descriptions are provided in the specifications for Jingle application formats and transport methods.

6.1 Resource Determination

In order to initiate a Jingle session, the initiator needs to determine which of the responder's XMPP resources is best for the desired application format. Methods for doing so are out of scope for this specification. However, see the Determining Support section of this document (and associated specifications) for relevant information.

6.2 Initiation

Once the initiator has discovered which of the responder's XMPP resources is ideal for the desired application format, it sends a session initiation request to the responder. This request is an IQ-set containing a <jingle/> element qualified by the 'urn:xmpp:jingle:0' namespace (see Protocol Versioning regarding the possibility of incrementing the version number), where the value of the 'action' attribute is "session-initiate" and where the <jingle/> element contains one or more <content/> elements. Each <content/> element defines a content type to be transferred during the session, and each <content/> element in turn contains one <description/> child element that specifies a desired application format and one <transport/> child element that specifies a potential transport method. If either party wishes to propose the use of multiple transport methods for the same application format, it MUST include multiple <content/> elements.

Example 7. Initiator sends session-initiate

<iq from='romeo@montague.net/orchard'
    id='jingle1'
    to='juliet@capulet.com/balcony'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'>
          action='session-initiate'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
        <payload-type id='96' name='speex' clockrate='16000'/>
        <payload-type id='97' name='speex' clockrate='8000'/>
        <payload-type id='18' name='G729'/>
        <payload-type id='0' name='PCMU' />
        <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
        <payload-type id='98' name='x-ISAC' clockrate='8000'/>
      </description>
      <transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'/>
    </content>
  </jingle>
</iq>
    

Note: The syntax and semantics of the <description/> and <transport/> elements are out of scope for this document, since they are defined in related specifications. The syntax and semantics of the <jingle/> and <content/> elements are specified in this document under Formal Definition.

Note: In order to expedite session establishment, the initiator MAY send transport candidates (e.g., for negotiation of the ICE transport) immediately after sending the session-initiate action and before receiving acknowledgement from the responder (i.e., the initiator MUST consider the session to be PENDING even before receiving acknowledgement). Given in-order delivery in accordance with XMPP Core [13], the responder will receive such transport-info actions after receiving the session-initiate action (if not, it is appropriate for the responder to return <unknown-session/> errors since according to its state machine the session does not exist).

Example 8. Responder returns unknown-session error

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='cancel'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <unknown-session xmlns='urn:xmpp:jingle:errors:0'/>
  </error>
</iq>
    

6.3 Responder Response

6.3.1 Acknowledgement

Unless one of the following errors occurs, the responder SHOULD acknowledge receipt of the initiation request.

Example 9. Responder acknowledges session-initiate

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='result'/>
      

However, after acknowledging the session initiation request, the responder might subsequently determine that it cannot proceed with negotiation of the session (e.g., because it does not support any of the offered application formats or transport methods, because a human user is busy or unable to accept the session, because a human user wishes to formally decline the session, etc.). In these cases, the responder SHOULD immediately acknowledge the session initiation request but then terminate the session with an appropriate reason as described in the Termination section of this document.

6.3.2 Errors

There are several reasons why the responder might immediately return an error instead of acknowledging receipt of the initiation request:

If the initiator is unknown to the responder (e.g., via presence subscription as defined in RFC 3921 [14] or stanza session negotiation as defined in Stanza Session Negotiation [15]) and the responder has a policy of not communicating via Jingle with unknown entities, it MUST return a <service-unavailable/> error.

Example 10. Initiator is unknown to responder

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='cancel'>
    <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
      

If the responder does not support Jingle, it MUST return a <service-unavailable/> error.

Example 11. Responder does not support Jingle

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='cancel'>
    <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
      

If the responder wishes to redirect the request to another address, it MUST return a <redirect/> error.

Example 12. Responder redirection

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='cancel'>
    <redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>
      xmpp:voicemail@capulet.lit
    </redirect>
  </error>
</iq>
      

If the responder does not have sufficient resources to participate in a session, it MUST return a <resource-constraint/> error.

Example 13. Responder has insufficent resources

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='wait'>
    <resource-constraint xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
      

If the initiation request was malformed, the responder MUST return a <bad-request/> error.

Example 14. Initiation request malformed

<iq from='juliet@capulet.com/balcony'
    id='jingle1'
    to='romeo@montague.net/orchard'
    type='error'>
  <error type='cancel'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
      

6.4 Negotiation

In general, negotiation will be necessary before the parties can agree on an acceptable set of application formats and transport methods. There are many potential parameter combinations, as defined in the relevant specifications for various application formats and transport methods.

The allowable negotiations (including content-level and transport-level negotiations) are as follows:

6.5 Acceptance

If (after negotiation of transport methods and application formats as well as checking of transport candidates) the responder determines that it will be able to establish a connection, it sends a definitive acceptance to the initiator.

Example 15. Responder accepts the session

<iq from='juliet@capulet.com/balcony'
    id='accept1'
    to='romeo@montague.net/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-accept'
          initiator='romeo@montague.net/orchard'
          responder='juliet@capulet.com/balcony'
          sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
        <payload-type id='97' name='speex' clockrate='8000'/>
        <payload-type id='18' name='G729'/>
      </description>
      <transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'>
        <candidate component='1'
                   foundation='1'
                   generation='0'
                   ip='192.0.2.3'
                   network='1'
                   port='45664'
                   priority='1678246398'
                   protocol='udp'
                   pwd='asd88fgpdd777uzjYhagZg'
                   type='srflx'
                   ufrag='8hhy'/>
      </transport>
    </content>
  </jingle>
</iq>
    

The initiator then acknowledges the responder's definitive acceptance, after which the parties can exchange media over the negotiated connection.

Example 16. Initiator acknowledges session acceptance

<iq from='romeo@montague.net/orchard'
    id='accept1'
    to='juliet@capulet.com/balcony'
    type='result'/>
    

If one of the parties cannot find a suitable transport method or candidate, it SHOULD terminate the session as described below.

6.6 Modifying an Active Session

Once a session is in the ACTIVE state, it might be modified via a content-add, content-modify, content-remove, or transport-info action. Examples of such modifications are shown in the specifications for various application formats and transport methods.

6.7 Termination

In order to gracefully end the session (which can be done at any point after acknowledging receipt of the initiation request, including immediately thereafter in order to decline the request), either the responder or the initiator MUST send a session-terminate action to the other party.

The party that terminates the session SHOULD include a <reason/> element that specifies why the session is being terminated. Examples follow.

One reason for terminating the session is that the terminating party is busy; in this case, the recommended condition is "busy".

Example 17. Terminating the session (busy)

<iq from='juliet@capulet.lit/balcony'
    id='term1'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <busy/>
    </reason>
  </jingle>
</iq>
  

Another reason for terminating the session is that the terminating party wishes to formally decline the session; in this case, the recommended condition is "decline".

Example 18. Terminating the session (session formally declined)

<iq from='juliet@capulet.lit/balcony'
    id='term2'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <decline/>
    </reason>
  </jingle>
</iq>
    

Another reason for terminating the session is that the terminating party already has an existing session with the other party and wishes to use that session rather than initiate a new session; in this case, the recommended condition is "alternative-session" and the terminating party SHOULD include the session ID of the atlernative session in the <sid/> element.

Example 19. Terminating the session (existing session)

<iq from='juliet@capulet.lit/balcony'
    id='term3'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <alternative-session>
        <sid>b84tkkwlmb48kgfb</sid>
      </alternative-session>
    </reason>
  </jingle>
</iq>
    

Another reason for terminating the session is that the terminating party does not support any of the offered application formats; in this case, the recommended condition is "unsupported-applications".

Example 20. Terminating the session (no offered application format supported)

<iq from='juliet@capulet.lit/balcony'
    id='term4'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <unsupported-applications/>
    </reason>
  </jingle>
</iq>
    

Another reason for terminating the session is that the terminating party does not support any of the offered transport methods; in this case, the recommended condition is "unsupported-transports".

Example 21. Terminating the session (no offered transport method supported)

<iq from='juliet@capulet.lit/balcony'
    id='term5'
    to='romeo@montague.lit/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-terminate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <reason>
      <unsupported-transports/>
    </reason>
  </jingle>
</iq>
    

Upon receiving an action of "session-terminate", the other party MUST then acknowledge termination of the session:

Example 22. Acknowledging termination

<iq from='romeo@montague.lit/orchard'
    id='term1'
    to='juliet@capulet.lit/balcony'
    type='result'/>
    

Note: As soon as an entity sends a session-terminate action, it MUST consider the session to be in the ENDED state (even before receiving acknowledgement from the other party). If the terminating entity receives additional Jingle-related IQ-sets from the other party after sending the session-terminate action, it MUST reply with an <unknown-session/> error.

Unfortunately, not all sessions end gracefully. In applications of Jingle that also involve the exchange of presence information, receipt of <presence type='unavailable'/> from the other party MAY be considered a session-ending event. However, in this case there is nothing for the party to acknowledge.

6.8 Informational Messages

At any point after initiation of a Jingle session, either entity MAY send an informational message to the other party, for example to inform the other party that a device is ringing.

Example 23. Responder sends ringing message

<iq from='juliet@capulet.com/balcony'
    id='ringing1'
    to='romeo@montague.net/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-info'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <ringing xmlns='urn:xmpp:jingle:apps:rtp:0:info'/>
  </jingle>
</iq>
    

An informational message MUST be an IQ-set containing a <jingle/> element whose 'action' attribute is set to a value of "session-info" or "transport-info"; the <jingle/> element SHOULD further contain a payload child element (specific to the application format or transport method) that specifies the information being communicated. If the party that receives an informational message does not understand the payload, it MUST return a <feature-not-implemented/> error with a Jingle-specific error condition of <unsupported-info/>.

Example 24. Responder returns unsupported-info error

<iq from='romeo@montague.lit/orchard'
    id='ringing1'
    to='juliet@capulet.lit/balcony'
    type='error'>
  <error type='modify'>
    <feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <unsupported-info xmlns='urn:xmpp:jingle:errors:0'/>
  </error>
</iq>
    

However, the <jingle/> element associated with a session-info action MAY be empty. If either party receives an empty session-info action for an active session, it MUST send an empty IQ result; this usage functions as a "ping" to determine session vitality.

Example 25. Responder sends session ping

<iq from='juliet@capulet.com/balcony'
    id='ping1'
    to='romeo@montague.net/orchard'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:0'
          action='session-info'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'/>
</iq>
    

Example 26. Initiator returns IQ-result

<iq from='romeo@montague.lit/orchard'
    id='ping1'
    to='juliet@capulet.lit/balcony'
    type='result'/>
    

7. Formal Definition

7.1 Jingle Element

The <jingle/> element MAY be empty or contain one or more <content/> elements (for which see Content Element).

The attributes of the <jingle/> element are as follows.

Table 2: Attributes of Jingle Element

Attribute Definition Inclusion
action A Jingle action as described under Action Attribute. REQUIRED
initiator The full JID of the entity that has initiated the session flow (which can be different from the 'from' address on the IQ-set). REQUIRED
responder The full JID of the entity that has replied to the initiation, which can be different from the 'to' address on the IQ-set. RECOMMENDED
sid A random session identifier generated by the initiator, which effectively maps to the local-part of a SIP "Call-ID" parameter; this SHOULD match the XML Nmtoken production [16] so that XML character escaping is not needed for characters such as '&'. REQUIRED

7.2 Action Attribute

The value of the 'action' attribute SHOULD be one of the following. If an entity receives a value not defined here, it SHOULD ignore attribute and SHOULD return a <bad-request/> error to the sender.

7.2.1 content-accept

The content-accept action is used to accept a content-add action received from another party.

7.2.2 content-add

The content-add action is used to add one or more new content definitions to the session. The sender MUST specify only the added content definition(s), not the added content definition(s) plus the existing content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). If the recipient wishes to include the new content definition in the session, it MUST send a content-accept action to the other party.

7.2.3 content-modify

The content-modify action is used to change the direction of an existing content definition thorugh modification of the 'senders' attribute. If the recipient deems the directionality of a content-modify action to be unacceptable, it MAY reply with a contrary content-modify action, terminate the session, or simply refuse to send or accept application data in the new direction. In any case, the recipient MUST NOT send a content-accept action in response to the content-modify.

7.2.4 content-remove

The content-remove action is used to remove one or more content definitions from the session. The sender MUST specify only the removed content definition(s), not the removed content definition(s) plus the remaining content definition(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content definition(s). Upon receiving a content-remove from the other party, the recipient MUST NOT send a content-accept and MUST NOT continue to negotiate the transport method related to that content definition or send application data related to that content definition. [17]

7.2.5 session-accept

The session-accept action is used to definitively accept a session negotiation (implicitly this action also serves as a content-accept). A session-accept action indicates acceptance only of the content definition(s) included in the session-initiate, not any content definition(s) subsequently added during the PENDING state. In the session-accept stanza, the <jingle/> element MUST contain one or more <content/> elements, each of which MUST contain one <description/> element and one <transport/> element. The <jingle/> element SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity; after sending acknowledgement of the session-accept, the initiator SHOULD send all future commmunications about this Jingle session to the JID provided in the 'responder' attribute and note the new JID in the user interface.

7.2.6 session-info

The session-info action is used to send session-level information, such as (for Jingle RTP sessions) a ringing message.

7.2.7 session-initiate

The session-initiate action is used to request negotiation of a new Jingle session.

7.2.8 session-terminate

The session-terminate action is used to end an existing session.

7.2.9 transport-accept

The transport-accept action is used to accept a transport-replace action received from another party.

7.2.10 transport-info

The transport-info action is used to exchange transport candidates; it is mainly used in XEP-0176 but might be used in other transport specifications.

7.2.11 transport-replace

The transport-replace action is used to redefine a transport method.

7.2.12 Tie Breaking Related to Jingle Actions

It is possible that two instances of certain actions can be sent at the same time in the context of an existing session, one by each party; for example, both parties might simulaneously attempt to send a content-add, content-modify, or content-remove action. In all such cases, the action sent by the initiator MUST overrule the action sent by the responder; i.e., both parties MUST accept the action sent by the initiator and the initiator MUST return an <unexpected-request/> error to the responder for the duplicate action.

7.3 Content Element

The attributes of the <content/> element are as follows.

Table 3: Attributes of Content Element

Attribute Definition Inclusion
creator Which party originally generated the content type (used to prevent race conditions regarding modifications); the defined values are "initiator" and "responder" (where the default is "initiator"). REQUIRED
name A unique name or identifier for the content type according to the creator, which MAY have meaning to a human user in order to differentiate this content type from other content types (e.g., two content types containing video media could differentiate between "room-pan" and "slides"). REQUIRED
senders Which parties in the session will be generating content; the allowable values are "initiator", "responder", or "both" (where the default is "both"). RECOMMENDED

7.4 Reason Element

The structure of the <reason/> element is as follows.

The defined conditions are described in the following table.

Table 4: Defined Conditions

Element Description
<alternative-session/> The party prefers to use an existing session with the peer rather than initiate a new session; the Jingle session ID of the alternative session SHOULD be provided as the XML character data of the <sid/> child.
<busy/> The party is busy and cannot accept a session.
<connectivity-error/> The action is related to connectivity problems.
<decline/> The party wishes to formally decline the session.
<general-error/> The action is related to a non-specific application error.
<media-error/> The action is related to media processing problems.
<no-error/> The action is generated during the normal course of state management.
<success/> The session has been successfully completed.
<unsupported-applications/> The party supports none of the offered application types.
<unsupported-transports/> The party supports none of the offered transport methods.

7.5 Thread Element

The syntax and semantics of the <thread/> element exactly matches that of the <thread/> element as defined for the <message/> stanza (qualified by the 'jabber:client' namespace) as defined in XMPP IM [18]. It is used to associate a Jingle session or sessions with an ongoing conversation, so that user interfaces with the ability to present multiple interactions in the same window can show an association between the conversation and the Jingle session(s).

8. Error Handling

The Jingle-specific error conditions are as follows. These condition elements are qualified by the 'urn:xmpp:jingle:errors:0' namespace (see Protocol Versioning regarding the possibility of incrementing the version number).

Table 5: Error Conditions

Jingle Condition XMPP Condition Description
<out-of-order/> <unexpected-request/> The request cannot occur at this point in the state machine (e.g., session-initiate after session-accept).
<unknown-session/> <bad-request/> The 'sid' attribute specifies a session that is unknown to the recipient (e.g., no longer live according to the recipient's state machine because the recipient previously terminated the session).
<unsupported-info/> <feature-not-implemented/> The recipient does not support the informational payload of a session-info action.

9. Determining Support

If an entity supports Jingle, it MUST advertise that fact by returning a feature of "urn:xmpp:jingle:0" (see Protocol Versioning regarding the possibility of incrementing the version number) in response to a Service Discovery [19] information request. The response MUST also include features for the application formats and transport methods supported by the responding entity, as described in the relevant specifications.

Example 27. Service Discovery Information Request

<iq from='kingclaudius@shakespeare.lit/castle'
    id='disco1'
    to='laertes@shakespeare.lit/castle'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
  

Example 28. Service Discovery Information Response

<iq from='laertes@shakespeare.lit/castle'
    id='disco1'
    to='kingclaudius@shakespeare.lit/castle'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    ...
    <feature var='urn:xmpp:jingle:0'/>
    ...
  </query>
</iq>
  

In order for an application to determine whether an entity supports this protocol, where possible it SHOULD use the dynamic, presence-based profile of service discovery defined in Entity Capabilities [20]. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

10. Conformance by Using Protocols

10.1 Application Formats

A document that specifies a Jingle application format (e.g., RTP sessions) MUST define:

  1. How successful application format negotiation occurs.
  2. A <description/> element and associated semantics for representing the application format.
  3. If and how the application format can be mapped to the Session Description Protocol, including the appropriate SDP media type (see Section 8.2.1 of RFC 4566).
  4. Whether the media for the application format shall be sent over a stream transport method or a datagram transport method (or, if both, which is preferred).
  5. Exactly how the media is to be sent and received over a stream or datagram transport.

10.2 Transport Methods

A document that specifies a Jingle transport method (e.g., raw UDP) MUST define:

  1. How successful transport negotiation occurs.
  2. A <transport/> element and associated semantics for representing the transport method.
  3. Whether the transport is stream or datagram.
  4. If and how the transport handles "components" (e.g., for the Real Time Control Protocol).

11. Security Considerations

11.1 Denial of Service

Jingle sessions can be resource-intensive. Therefore, it is possible to launch a denial-of-service attack against an entity by burdening it with too many Jingle sessions. Care must be taken to accept sessions only from known entities and only if the entity's device is able to process such sessions.

11.2 Communication Through Gateways

Jingle communications can be enabled through gateways to non-XMPP networks, whose security characteristics can be quite different from those of XMPP networks. (For example, on some SIP networks authentication is optional and "from" addresses can be easily forged.) Care must be taken in communicating through such gateways.

11.3 Information Exposure

Mere negotiation of a Jingle session can expose sensitive information about the parties (e.g., IP addresses). Care must be taken in communicating such information, and end-to-end encryption should be used if the parties do not trust the intermediate servers or gateways.

12. IANA Considerations

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

13. XMPP Registrar Considerations

13.1 Protocol Namespaces

This specification defines the following XML namespaces:

Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [22] shall add the foregoing namespaces to the registry located at <http://www.xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function [23].

13.2 Namespace Versioning

If the protocol defined in this specification undergoes a major revision that is not fully backward-compatible with an older version, or that contains significant new features, 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.

13.3 Jingle Application Formats Registry

The XMPP Registrar shall maintain a registry of Jingle application formats. All application format registrations shall be defined in separate specifications (not in this document). Application types defined within the XEP series MUST be registered with the XMPP Registrar, resulting in protocol URNs of the form "urn:xmpp:jingle:app:name" (where "name" is the registered name of the application format).

In order to submit new values to this registry, the registrant must define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <registrar@xmpp.org>:

<application>
  <name>The name of the application format.</name>
  <desc>A natural-language summary of the application format.</desc>
  <transport>
    Whether the media can be sent over a "stream" transport, 
    a "datagram" transport, or "both".
  </transport>
  <doc>The document in which the application format is specified.</doc>
</application>
    

13.4 Jingle Transport Methods Registry

The XMPP Registrar shall maintain a registry of Jingle transport methods. All transport method registrations shall be defined in separate specifications (not in this document). Transport methods defined within the XEP series MUST be registered with the XMPP Registrar, resulting in protocol URNs of the form "urn:xmpp:jingle:transport:name" (where "name" is the registered name of the transport method).

In order to submit new values to this registry, the registrant must define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <registrar@xmpp.org>:

<transport>
  <name>the name of the transport method</name>
  <desc>a natural-language summary of the transport method</desc>
  <type>whether the transport method can be "stream", "datagram", or "both"</type>
  <doc>the document in which this transport method is specified</doc>
</transport>
    

14. XML Schemas

14.1 Jingle

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

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:jingle:0'
    xmlns='urn:xmpp:jingle:0'
    elementFormDefault='qualified'>

  <xs:element name='jingle'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='content' 
                    type='contentElementType'
                    minOccurs='0' 
                    maxOccurs='unbounded'/>
        <xs:element ref='reason' 
                    type='reasonElementType'
                    minOccurs='0' 
                    maxOccurs='1'/>
        <xs:element ref='thread' 
                    type='threadElementType'
                    minOccurs='0' 
                    maxOccurs='1'/>
        <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
      </xs:sequence>
      <xs:attribute name='action' use='required'>
        <xs:simpleType>
          <xs:restriction base='xs:NCName'>
            <xs:enumeration value='content-accept'/>
            <xs:enumeration value='content-add'/>
            <xs:enumeration value='content-modify'/>
            <xs:enumeration value='content-remove'/>
            <xs:enumeration value='session-accept'/>
            <xs:enumeration value='session-info'/>
            <xs:enumeration value='session-initiate'/>
            <xs:enumeration value='session-terminate'/>
            <xs:enumeration value='transport-add'/>
            <xs:enumeration value='transport-info'/>
            <xs:enumeration value='transport-replace'/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name='initiator' type='xs:string' use='required'/>
      <xs:attribute name='responder' type='xs:string' use='optional'/>
      <xs:attribute name='sid' type='xs:NMTOKEN' use='required'/>
    </xs:complexType>
  </xs:element>

  <xs:complexType name='alternativeSessionElementType'>
    <xs:sequence>
      <xs:element name='sid'
                  minOccurs='0'
                  maxOcccurs='1'
                  type='xs:NMTOKEN'/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name='contentElementType'>
    <xs:sequence>
      <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
    </xs:sequence>
    <xs:attribute name='creator' use='required' default='initiator'>
      <xs:simpleType>
        <xs:restriction base='xs:NCName'>
          <xs:enumeration value='initiator'>
          <xs:enumeration value='responder'/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name='name' use='required' type='xs:string'/>
    <xs:attribute name='senders' use='optional' default='both'>
      <xs:simpleType>
        <xs:restriction base='xs:NCName'>
          <xs:enumeration value='both'>
          <xs:enumeration value='initiator'>
          <xs:enumeration value='responder'/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name='reasonElementType'>
    <xs:sequence>
      <xs:choice>
        <xs:element name='alternative-session' 
                    type='alternativeSessionElementType'/>
        <xs:element name='busy' type='empty'/>
        <xs:element name='connectivity-error' type='empty'/>
        <xs:element name='decline' type='empty'/>
        <xs:element name='general-error' type='empty'/>
        <xs:element name='invalid-credentials' type='empty'/>
        <xs:element name='media-error' type='empty'/>
        <xs:element name='no-error' type='empty'/>
        <xs:element name='success' type='empty'/>
        <xs:element name='unsupported-applications' type='empty'/>
        <xs:element name='unsupported-transports' type='empty'/>
      </xs:choice>
      <xs:element name='text' type='xs:string' minOccurs='0' maxOccurs='1'/>
      <xs:any namespace='##other' minOccurs='0' maxOccurs='1'/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name='threadElementType'>
    <xs:simpleContent>
      <xs:extension base='xs:NMTOKEN'>
        <xs:attribute name='parent'
                      type='xs:NMTOKEN'
                      use='optional'/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
    

14.2 Jingle Errors

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

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:jingle:errors:0'
    xmlns='urn:xmpp:jingle:errors:0'
    elementFormDefault='qualified'>

  <xs:element name='out-of-order' type='empty'/>
  <xs:element name='unknown-session' type='empty'/>
  <xs:element name='unsupported-info' type='empty'/>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
    

15. History

Until Jingle was developed, there existed no widely-adopted standard for initiating and managing peer-to-peer interactions between XMPP entities. Although several large service providers and Jabber client teams had written and implemented their own proprietary XMPP extensions for peer-to-peer signalling (usually only for voice), those technologies were not open and did not always take into account requirements to interoperate with SIP-based technologies. The only existing open protocol was A Transport for Initiating and Negotiating Sessions [24], which made it possible to initiate and manage peer-to-peer sessions, but which did not provide enough of the key signalling semantics to be easily implemented in Jabber/XMPP clients. [25]

The result was an unfortunate fragmentation within the XMPP community regarding signalling protocols. Essentially, there were two possible approaches to solving the problem:

  1. Recommend that all client developers implement a dual-stack (XMPP + SIP) solution.
  2. Define a full-featured protocol for XMPP signalling.

Implementation experience indicates that a dual-stack approach might not be feasible on all the computing platforms for which Jabber clients have been written, or even desirable on platforms where it is feasible. [26] Therefore, it seemed reasonable to define an XMPP signalling protocol that could provide the necessary session management semantics while also making it relatively straightforward to interoperate with existing Internet standards.

As a result of feedback received on XEP-0111, the original authors of this document (Joe Hildebrand and Peter Saint-Andre) began to define such a signalling protocol, code-named Jingle. Upon communication with members of the Google Talk team, [27] it was discovered that the emerging Jingle approach was conceptually (and even syntactically) quite similar to the signalling protocol used in the Google Talk application. Therefore, in the interest of interoperability and adoption, we decided to harmonize the two approaches. The signalling protocol specified herein is, therefore, substantially equivalent to the original Google Talk protocol, with several adjustments based on feedback received from implementors as well as for publication by the XMPP Standards Foundation.

16. Acknowledgements

The authors would like to thank Rohan Mahy for his valuable input on early versions of the Jingle specifications. Thiago Camargo, Diana Cionoiu, Olivier Crête, Dafydd Harries, Antti Ijäs, Tim Julien, Lauri Kaila, Justin Karneges, Jussi Laako, Steffen Larsen, Anthony Minessale, Akito Nozaki, Matt O'Gorman, Rob Taylor, Matt Tucker, Justin Uberti, Saku Vainio, Brian West, Jeff Williams, and others have also provided helpful input. Thanks also to those who have commented on the Standards SIG [28] and Jingle [29] mailing lists.


Notes

1. RFC 3550: RTP: A Transport Protocol for Real-Time Applications <http://tools.ietf.org/html/rfc3550>.

2. RFC 768: User Datagram Protocol <http://tools.ietf.org/html/rfc0768>.

3. Interactive Connectivity Establishment (ICE): A Methodology for Network Address Translator (NAT) Traversal for Offer/Answer Protocols <http://tools.ietf.org/html/draft-ietf-mmusic-ice>. Work in progress.

4. XEP-0167: Jingle RTP Sessions <http://www.xmpp.org/extensions/xep-0167.html>.

5. RFC 3261: Session Initiation Protocol (SIP) <http://tools.ietf.org/html/rfc3261>.

6. XEP-0180: Jingle Video via RTP <http://www.xmpp.org/extensions/xep-0180.html>.

7. XEP-0176: Jingle ICE-UDP Transport Method <http://www.xmpp.org/extensions/xep-0176.html>.

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

9. XEP-0234: Jingle File Transfer <http://www.xmpp.org/extensions/xep-0234.html>.

10. XEP-0177: Jingle Raw UDP Transport Method <http://www.xmpp.org/extensions/xep-0177.html>.

11. ITU Recommendation H.323: Packet-based Multimedia Communications Systems (September 1999).

12. Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Media Sessions <http://tools.ietf.org/html/draft-saintandre-sip-xmpp-media> (work in progress).

13. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc3920>.

14. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.

15. XEP-0155: Stanza Session Negotiation <http://www.xmpp.org/extensions/xep-0155.html>.

16. See <http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken>

17. If the content-remove results in zero content definitions for the session, the entity that receives the content-remove SHOULD send a session-terminate action to the other party (since a session with no content definitions is void).

18. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.

19. XEP-0030: Service Discovery <http://www.xmpp.org/extensions/xep-0030.html>.

20. XEP-0115: Entity Capabilities <http://www.xmpp.org/extensions/xep-0115.html>.

21. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

22. 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 <http://www.xmpp.org/registrar/>.

23. XEP-0053: XMPP Registrar Function <http://www.xmpp.org/extensions/xep-0053.html>.

24. XEP-0111: A Transport for Initiating and Negotiating Sessions <http://www.xmpp.org/extensions/xep-0111.html>.

25. It is true that TINS made it relatively easy to implement an XMPP-to-SIP gateway; however, in line with the long-time Jabber philosophy of "simple clients, complex servers", it would be better to force complexity onto the server-side gateway and to keep the client as simple as possible.

26. For example, one large ISP decided to switch to a pure XMPP approach after having implemented and deployed a dual-stack client for several years.

27. Google Talk is a messaging and voice chat service and client provided by Google; see <http://www.google.com/talk/>.

28. The Standards SIG is a standing Special Interest Group devoted to development of XMPP Extension Protocols. The discussion list of the Standards SIG is the primary venue for discussion of XMPP protocol extensions, as well as for announcements by the XMPP Extensions Editor and XMPP Registrar. To subscribe to the list or view the list archives, visit <http://mail.jabber.org/mailman/listinfo/standards/>.

29. Before this specification was formally accepted by the XMPP Standards Foundation as an XMPP Extension Protocol, it was discussed on the semi-private <jingle@jabber.org> mailing list. This list has since been resurrected as a special-purpose venue for discussion of Jingle protocols and implementation; interested developers can subscribe and access the archives at at <http://mail.jabber.org/mailman/listinfo/jingle/>.


Revision History

Version 0.30 (2008-09-23)

(ram/psa)

Version 0.29 (2008-07-31)

(psa/ram)

Version 0.28 (2008-06-16)

Modified state machine to allow content-replace during PENDING state for more seamless handling of fallback scenarios.

(psa)

Version 0.27 (2008-06-04)

Updated examples to track changes to XEP-0167 and retraction of XEP-0180; corrected definition of name attribute to allow semantic meaning.

(psa)

Version 0.26 (2008-05-28)

Corrected several errors in the state diagrams.

(psa)

Version 0.25 (2008-02-29)

More clearly specified the content-replace action (essentially similar to content-add); specified that content-accept shall be sent in response to content-replace; removed content-modify and content-accept from PENDING state; adjusted text regarding initial session negotiation.

(psa)

Version 0.24 (2008-02-28)

Added content-replace action; modified reasoncode and reasontext to use elements instead of attributes; added sid element to handle alternative-session condition; modified examples to use file transfer instead of voice chat; moved profile element to XEP-0167 and XEP-0180.

(ram/psa)

Version 0.23 (2008-01-11)

Removed content-accept after content-remove; removed errors for unsupported-content and unsupported-transports since they are handled via session-terminate; clarified handling of responder attribute.

(psa)

Version 0.22 (2007-12-06)

Modified session flows for busy, unsupported application formats, and unsupported transport methods to enable separation between Jingle core and distinct modules for applications and transports; moved resource determination recommendations to XEP-208.

(psa)

Version 0.21 (2007-11-27)

Further editorial review.

(psa)

Version 0.20 (2007-11-15)

Editorial review and consistency check; moved voice chat scenarios to XEP-0167.

(psa)

Version 0.19 (2007-11-13)

Added scenario for handling of busy state, including Jingle-specific error code and modified error flow (no longer an instance of decline).

(psa)

Version 0.18 (2007-11-08)

Added scenarios for various session flows; clarified handling of content-add, content-modify, and content-remove actions; clarified rules for codec priority.

(psa)

Version 0.17 (2007-06-20)

Added <unsupported-info/> error.

(psa)

Version 0.16 (2007-06-06)

Clarified resource determination process and updated text to reflect modifications to XEP-0168.

(psa)

Version 0.15 (2007-05-25)

Rewrote introduction and moved historical text to separate section.

(psa)

Version 0.14 (2007-04-17)

Clarified session lifetime; defined reason attribute and associated registry; further specified conformance requirements.

(psa)

Version 0.13 (2007-03-23)

Simplified signalling process and state chart; Removed session-redirect action (use redirect error instead); removed content-decline action; removed transport-* actions (except transport-info for ICE negotiation); removed description-* actions; simplified syntax to allow only one transport per content type; corrected syntax of creator attribute to be either initiator or responder (not JIDs); added profile attribute to content element in order to specify RTP profile in use.

(psa/ram)

Version 0.12 (2006-12-21)

Added creator attribute to content element for prevention of race condition; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).

(psa/ram)

Version 0.11 (2006-10-31)

Completed clarifications and corrections throughout; added section on Jingle Actions.

(psa)

Version 0.10 (2006-09-29)

Made several corrections to the state machines and examples.

(ram/psa)

Version 0.9 (2006-09-08)

Further cleaned up state machines and state-related actions.

(ram/psa)

Version 0.8 (2006-08-23)

Changed channels to components in line with ICE; changed various action names for consistency; added session-extend and session-reduce actions to add and remove description/transport pairs; added description-modify action; added sender attribute to specify directionality.

(ram/psa)

Version 0.7 (2006-07-17)

Added implementation note about handling multiple content types.

(psa)

Version 0.6 (2006-07-12)

Changed media type to content type.

(se/psa)

Version 0.5 (2006-03-20)

Further clarified state machine diagrams; specified that session accept must include agreed-upon media format and transport description; moved deployment notes to appropriate transport spec.

(psa/jb)

Version 0.4 (2006-03-01)

Added glossary; clarified state machines; updated to reflect publication of XEP-0176 and XEP-0177.

(psa/jb)

Version 0.3 (2006-02-24)

Provided more detail about modify scenarios; defined media-specific and transport-specific actions and adjusted state machine accordingly.

(psa/jb)

Version 0.2 (2006-02-13)

Per agreement among the co-authors, moved transport definition to separate specification, simplified state machine, and made other associated changes to the text, examples, and schemas; also harmonized redirect, decline, and terminate processes.

(psa/jb)

Version 0.1 (2005-12-15)

Initial version.

(psa)

Version 0.0.10 (2005-12-11)

More fully documented burst mode, connectivity checks, error cases, etc.

(psa)

Version 0.0.9 (2005-12-08)

Restructured document flow; provided example of burst mode.

(psa)

Version 0.0.8 (2005-12-05)

Distinguished between dribble mode and burst mode, including mode attribute, service discovery features, and implementation notes; provided detailed resource discovery examples; corrected state chart; specified session termination; specified error conditions; specified semantics of informational messages; began to define security considerations; added Joe Beda as co-author.

(psa/sl/jb)

Version 0.0.7 (2005-11-08)

Added more detail to basic session flow; harmonized candidate negotiation process with ICE.

(psa)

Version 0.0.6 (2005-10-27)

Added XMPP Registrar considerations; defined schema; completed slight syntax cleanup.

(psa)

Version 0.0.5 (2005-10-21)

Separated method description formats from signalling protocol.

(psa/sl)

Version 0.0.4 (2005-10-19)

Harmonized basic session flow with Google Talk protocol; added Scott Ludwig as co-author.

(psa/sl)

Version 0.0.3 (2005-10-10)

Added more detail to basic session flow.

(psa)

Version 0.0.2 (2005-10-07)

Protocol cleanup.

(psa/jjh)

Version 0.0.1 (2005-10-06)

First draft.

(psa/jjh)

END