This document provides guidelines to XMPP client developers for bootstrapping implementation of Jingle technologies.
WARNING: This Informational document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the best practice or protocol profile described herein is encouraged in exploratory implementations, although production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Series: XEP
Number: 0208
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Informational
Version: 0.3
Last Updated: 2007-11-15
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control:
HTML
RSS
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The preferred venue for discussion of this document is the standards@xmpp.org discussion list:
<http://mail.jabber.org/mailman/listinfo/standards>
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata may be sent to <editor@xmpp.org>.
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.
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".
1. Introduction
2. Resource Determination
3. Protocol Flow
4. Security Considerations
5. IANA Considerations
6. XMPP Registrar Considerations
6.1. Protocol Namespaces
6.2. Jingle Content Description Formats
7. XML Schema
Notes
Revision History
Jingle [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 [3] or Entity Capabilities [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 [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 [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 [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.)
<iq from='romeo@montague.net/orchard' id='jingle1' to='juliet@capulet.com/balcony' type='set'> <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns' action='session-initiate' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> <content creator='initiator' name='echo-this'> <description xmlns='http://www.xmpp.org/extensions/xep-0208.html#ns'/> <transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'> <candidate ip='10.1.1.104' port='17777' generation='0'/> </transport> </content> </jingle> </iq>
If none of the errors specified in XEP-0166 occurs, the responder acknowledges the session initiation request.
<iq from='juliet@capulet.com/balcony' id='jingle1' to='romeo@montague.net/orchard' type='result'/>
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.)
<iq from='juliet@capulet.com/balcony' id='jingle2' to='romeo@montague.net/orchard' type='set'> <jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns' action='session-accept' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'/> </iq>
<iq from='romeo@montague.net/orchard' id='accept1' to='juliet@capulet.com/balcony' type='result'/>
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:
<content> <name>echo</name> <desc>A bootstrapping method for exchanging echo protocol data (see RFC 862).</desc> <doc>XEP-0208</doc> </content>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://www.xmpp.org/extensions/xep-0208.html#ns' xmlns='http://www.xmpp.org/extensions/xep-0208.html#ns' elementFormDefault='qualified'> <xs:element name='description' type='empty'/> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
1. XEP-0166: Jingle <http://xmpp.org/extensions/xep-0166.html>.
2. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.
3. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
4. XEP-0115: Entity Capabilities <http://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 <http://xmpp.org/extensions/xep-0168.html>.
7. XEP-0155: Stanza Session Negotiation <http://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 <http://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 <http://xmpp.org/registrar/>.
Editorial review and consistency check.
(psa)Specified use of port 17777 as default.
(psa)Initial published version.
(psa)Changed echo namespace to be a content description format only; defined basic direct-tcp transport for bootstrapping purposes only.
(psa)First draft.
(psa)END