Jingle (XEP-0166) [1] defines a framework for using XMPP to negotiate and manage out-of-band media sessions. Unfortunately, most developers of XMPP clients have limited experience with multimedia applications such as voice and video, making it difficult to get started with implementation of Jingle technologies. Therefore this document provides a simple application format that client developers can use to bootstrap Jingle implementations.
Note: The methods specified herein are provided for experimentation and unit testing only. They are not intended for inclusion in released software or production environments.
In order to initiate a Jingle session, the initiator must determine which of the responder's XMPP resources is best for the desired application format. The following approach may be helpful to implementors:
If the intended responder shares presence with the initiator (see XMPP IM [2]) and has only one available resource, the initiator SHOULD attempt to negotiate a Jingle session with that resource unless the initiator knows via Service Discovery (XEP-0030) [3] or Entity Capabilities (XEP-0115) [4] that the resource does not support Jingle and the desired application format. [5]
If the intended responder shares presence with the initiator and has more than one available resource but only one of the resources supports Jingle and the desired application format, the initiator SHOULD initiate the Jingle session with that resource.
If the intended responder shares presence with the initiator and has more than one available resource but more than one of the resources supports Jingle and the desired application format, the initiator SHOULD use Resource Application Priority (XEP-0168) [6] in order to determine which is the best resource with which to initiate the desired Jingle session.
If the intended responder does not share presence with the initiator, the initiator SHOULD first send a Stanza Session Negotiation (XEP-0155) [7] request to the responder in order to initiate the exchange of XMPP stanzas. The request SHOULD include a RAP routing hint as specified in XEP-0168 and the <message/> stanza containing the request SHOULD be of type "headline" so that (typically) it is not stored offline for later delivery. The stanza session negotiation SHOULD result in temporary sharing of presence between the parties via the "presence" field as described in XEP-0155.
The intent of this simple Jingle profile is to enable exchange of data using the Echo Protocol specified in RFC 862 [8], but using a port other than 7 (the default port for this experimental usage is 17777). The protocol flow is as follows. (The following examples use Jingle Raw UDP Transport Method (XEP-0177) [9] as the transport protocol; although it is possible to complete echo protocol exchanges via TCP, that is deemed less useful and there is no Jingle transport method for direct TCP exchanges.)
If none of the errors specified in XEP-0166 occurs, the responder acknowledges the session initiation request.
If no negotiation is required (e.g., to modify the port number or transport method), the responder simply accepts the session. (Alternatively, if the responder wants to use a port other 17777, it SHOULD negotiate the port using a Jingle content-modify action; see XEP-0166 for details and examples.)
The parties may now exchange data using the echo protocol in order to test the connection.
As noted, the methods specified herein are provided for experimental use only and are not intended for inclusion in released software or production environments.
On some operating systems, access to the root or administrative user may be necessary in order to use the echo protocol over TCP or UDP port 7; therefore it is RECOMMENDED to use port 17777 instead.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [10].
Because this specification defines an experimental protocol that is to be used only for bootstrapping purposes, the XMPP Registrar [11] shall not issue a permanent namespace upon approval of this specification. Therefore, its associated namespace shall always be "http://www.xmpp.org/extensions/xep-0208.html#ns".
The XMPP Registrar shall include "echo" in its registry of Jingle content description formats. The registry submission is as follows:
This document in other formats: XML PDF
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.
## 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 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.
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).
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.
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.
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 <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
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".
1. XEP-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.
2. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
3. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
4. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
5. Naturally, instead of sending service discovery requests to every contact in a user's roster, it is more efficient to use Entity Capabilities, whereby support for Jingle and various Jingle application formats and transport methods is determined for a client version in general (rather than on a per-JID basis) and then cached. Refer to XEP-0115 for details.
6. XEP-0168: Resource Application Priority <https://xmpp.org/extensions/xep-0168.html>.
7. XEP-0155: Stanza Session Negotiation <https://xmpp.org/extensions/xep-0155.html>.
8. RFC 862: Echo Protocol <http://tools.ietf.org/html/rfc0862>.
9. XEP-0177: Jingle Raw UDP Transport Method <https://xmpp.org/extensions/xep-0177.html>.
10. 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/>.
11. 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/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Retracted because unnecessary given the wide implementation of Jingle.
Editorial review and consistency check.
Specified use of port 17777 as default.
Initial published version.
Changed echo namespace to be a content description format only; defined basic direct-tcp transport for bootstrapping purposes only.
First draft.
END