XEP-0208: Bootstrapping Implementation of Jingle

Abstract
This document provides guidelines to XMPP client developers for bootstrapping implementation of Jingle technologies.
Author
Peter Saint-Andre
Copyright
© 2007 – 2009 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Retracted

WARNING: This document has been retracted by the author(s). Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (if any).
Type
Informational
Version
0.4 (2009-01-06)
Document Lifecycle
  1. Experimental
  2. Retracted
  3. Proposed
  4. Active

1. Introduction

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.

2. Resource Determination

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:

  1. 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]

  2. 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.

  3. 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.

  4. 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.

3. Protocol Flow

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.)

Example 1. Initiation
<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.

Example 2. Responder acknowledges session-initiate
<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.)

Example 3. Responder definitively accepts the session
<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>
Example 4. Initiating entity acknowledges definitive acceptance
<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.

4. Security Considerations

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.

5. IANA Considerations

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

6. XMPP Registrar Considerations

6.1 Protocol Namespaces

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

6.2 Jingle Content Description Formats

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>

7. XML Schema

<?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>

Appendices

Appendix A: Document Information

Series
XEP
Number
0208
Publisher
XMPP Standards Foundation
Status
Retracted
Type
Informational
Version
0.4
Last Updated
2009-01-06
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0166
Supersedes
None
Superseded By
None
Short Name
N/A
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 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. ##

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

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/community/> for a complete list.

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. 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/>.

Appendix H: Revision History

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

  1. Version 0.4 (2009-01-06)

    Retracted because unnecessary given the wide implementation of Jingle.

    psa
  2. Version 0.3 (2007-11-15)

    Editorial review and consistency check.

    psa
  3. Version 0.2 (2007-05-11)

    Specified use of port 17777 as default.

    psa
  4. Version 0.1 (2007-04-10)

    Initial published version.

    psa
  5. Version 0.0.2 (2007-03-23)

    Changed echo namespace to be a content description format only; defined basic direct-tcp transport for bootstrapping purposes only.

    psa
  6. Version 0.0.1 (2007-02-27)

    First draft.

    psa

Appendix I: Bib(La)TeX Entry

@report{saint-andre2007n/a,
  title = {Bootstrapping Implementation of Jingle},
  author = {Saint-Andre, Peter},
  type = {XEP},
  number = {0208},
  version = {0.4},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0208.html},
  date = {2007-02-27/2009-01-06},
}

END