XEP-0177: Jingle Raw UDP Transport

This document defines a Jingle transport method that results in sending data over a raw User Datagram Protocol (UDP) connection.

NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the JSF standards process.

XEP Information

Status: Proposed
Type: Standards Track
Number: 0177
Version: 0.3
Last Updated: 2006-10-31
Publishing Organization: Jabber Software Foundation
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
Supersedes: None
Superseded By: None
Short Name: raw-udp
Wiki Page: <http://wiki.jabber.org/index.php/Jingle Raw UDP Transport (XEP-0177)>

Author Information

Joe Beda

Email: jbeda@google.com
JID: jbeda@google.com

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Scott Ludwig

Email: scottlu@google.com
JID: scottlu@google.com

Joe Hildebrand

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

Sean Egan

Email: seanegan@google.com
JID: seanegan@google.com

Legal Notice

This XMPP Extension Protocol is copyright 1999 - 2006 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).

Discussion Venue

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

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 Jabber Software 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. Requirements
3. Protocol Description
3.1. Transport Initiation
3.2. Receiver Response
3.3. Exchanging Address Information
3.4. Informational Messages
4. Security Considerations
4.1. End-to-End Data Encryption
5. IANA Considerations
6. XMPP Registrar Considerations
6.1. Protocol Namespaces
6.2. Jingle Transport Methods
7. XML Schema
Revision History

1. Introduction

Jingle [1] defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor content formats, leaving that up to separate specifications. The current document defines a transport method for establishing and managing data between XMPP entities using a raw User Datagram Protocol (UDP) connection (see RFC 768 [2]).

2. Requirements

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

  1. Make it possible to establish and manage out-of-band connections between two XMPP entities over the IP address and port that the initiator considers most likely to succeed.
  2. Make it relatively easy to implement support in standard Jabber/XMPP clients.
  3. 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.

Note: The Raw UDP transport does not provide traversal of Network Address Translators (NATs) and is provided only for the purpose of specifying the IP address and port that an entity considers most likely to succeed without the need for NAT traversal. If NAT traversal is needed, Jingle RTP-ICE Transport Method [3] SHOULD be used.

3. Protocol Description

3.1 Transport Initiation

In order for the initiating entity in a Jingle exchange to start the negotiation, it MUST send a Jingle "session-initiate" stanza as described in XEP-0166. This stanza MUST include at least one transport methods. If the initiating entity wishes to negotiate the Raw UDP transport, it MUST include an empty <transport/> child element qualified by the 'http://jabber.org/protocol/jingle/transport/raw-udp' namespace.

Example 1. Initiation Example

<iq to='juliet@capulet.com/balcony' from='romeo@montague.net/orchard' id='jingle1' type='set'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
    <content name='this-is-the-audio-content'>
      <description ...>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'/>

3.2 Receiver Response

As described in XEP-0166, to provisionally accept the session initiation request, the receiver returns an IQ-result:

Example 2. Receiver Provisionally Accepts the Session Request

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

3.3 Exchanging Address Information

Once the session is provisionally accepted, each entity SHOULD send one <transport/> element in a transport-info meessage, containing exactly one <candidate/> element per content type, whose 'ip' and 'port' attributes specify the IP address and port number of the candidate that the initiator has reason to believe will be most likely to succeed for that content type. This is not necessarily the initiator's preferred address for communication, but instead is the "address most likely to succeed", i.e., the address that is assumed to be reachable by the vast majority of target entities. To determine reachability, the client needs classify ahead of time the permissiveness of the NAT or firewall it is behind, if any. If the NAT is symmetric (not permissive), the candidate SHOULD specify a relay address. Otherwise it SHOULD be an address derived via prior discovery using RFC 3489 [4], which will be an address on the outside of the firewall or NAT.

Note: The Raw UDP candidate is equivalent to the "in-use" candidate as described in Interactive Connectivity Establishment (ICE) [5]. (In older versions of XEP-0166, this was referrred to as the "default candidate".)

Example 3. Address Exchange Example

<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jingle2' type='set'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
    <content name='this-is-the-audio-content'>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
        <candidate name='myvoicedata' ip='' port='13540' generation='0'/>

The 'generation', 'ip', 'name', and 'port' attributes are REQUIRED. The 'name' attribute specifies the name of the content type and the 'generation' attribute provides a tracking mechanism for determining which version of this candidate is in force (this is useful if the candidate is redefined mid-stream, for example if the port is changed).

Either entity may send this "transport-info" action at any time, after which the recipient should attempt to send media data to the specified address (either entity MAY also send the Informational Messages described below). If media data can be delivered for the candidate, the recipient MUST send a Jingle "transport-accept" action to the initiator (either explicitly, or implicitly via a "content-accept" or "session-accept" action.

Example 4. Responder Returns Transport-Accept

<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept1'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
    <content name='this-is-the-audio-content'>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
        <candidate name='myvoicedata' ip='' port='13540' generation='0'/>

The initiator MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).

3.4 Informational Messages

Informational messages may be sent by the receiver within the context of the Raw UDP transport to communicate the status of transport checking. The informational message MUST be an IQ-set containing a <jingle/> element of type "transport-info", where the informational message is a payload element qualified by the 'http://jabber.org/protocol/jingle/info/raw-udp' namespace; the following payload elements are defined:

Table 1: Information Payload Elements

Element Meaning
<failed/> Connectivity checks failed.
<succeeded/> Connectivity checks succeeded.
<trying/> Connectivity checks are underway.

Note: Because the informational message is sent in an IQ-set, the receiving party MUST return either an IQ-result or an IQ-error (normally only an IQ-result to acknowledge receipt; no error flows are defined or envisioned at this time).

4. Security Considerations

4.1 End-to-End Data Encryption

In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method; in the case of UDP, that would include Datagram Transport Layer Security (DTLS) as specified in RFC 4347 [6].

5. IANA Considerations

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

6. XMPP Registrar Considerations

6.1 Protocol Namespaces

The XMPP Registrar [8] shall include 'http://jabber.org/protocol/jingle/transport/raw-udp' in its registry of protocol namespaces.

6.2 Jingle Transport Methods

The XMPP Registrar shall include "http://jabber.org/protocol/jingle/transport/raw-udp" in its registry of Jingle transport methods. The registry submission is as follows:

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@jabber.org>:

  <desc>A method for exchanging data over a raw UDP connection.</desc>

7. XML Schema

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


  <xs:element name='transport'>
        <xs:element ref='candidate' minOccurs='0' maxOccurs='1'/>

  <xs:element name='candidate'>
        <xs:extension base='empty'>
          <xs:attribute name='generation' type='xs:unsignedByte' use='required'/>
          <xs:attribute name='name' type='xs:string' use='required'/>
          <xs:attribute name='ip' type='xs:string' use='required'/>
          <xs:attribute name='port' type='xs:unsignedShort' use='required'/>

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



1. XEP-0166: Jingle <http://www.xmpp.org/extensions/xep-0166.html>.

2. RFC 768: User Datagram Protocol <http://www.ietf.org/rfc/rfc0768.txt>.

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

4. RFC 3489: STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) <http://www.ietf.org/rfc/rfc3489.txt>.

5. Interactive Connectivity Establishment (ICE): A Methodology for Network Address Translator (NAT) Traversal for Offer/Answer Protocols <http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-12.txt>. Work in progress.

6. RFC 4347: Datagram Transport Layer Security <http://www.ietf.org/rfc/rfc4347.txt>.

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

8. 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 Jabber Software Foundation. For further information, see <http://www.xmpp.org/registrar/>.

Revision History

Version 0.3 (2006-10-31)

Added informational messages; clarified connectivity checks and acceptance process; mentioned that the Raw UDP candidate is conceptually equivalent to the concept of an in-use candidate from the ICE specification; added reference to RFC 4347. (psa)

Version 0.2 (2006-07-12)

Removed candidate element and specified exchange of address information via transport-info messages; clarified usage of name attribute. (se/psa)

Version 0.1 (2006-03-01)

Initial version (split from XEP-0166). (psa/jb)