%ents; ]>
Jingle Raw UDP Transport Method This specification defines a Jingle transport method that results in sending media data using raw datagram sockets via the User Datagram Protocol (UDP). This simple transport method does not provide NAT traversal, and the ICE-UDP transport method should be used if NAT traversal is required. &LEGALNOTICE; 0177 Experimental Standards Track Standards Council XMPP Core XEP-0166 NOT_YET_ASSIGNED &joebeda; &stpeter; &scottlu; &hildjj; &seanegan; 0.12 2008-10-20 psa

For consistency with the ICE-UDP transport method, added component attribute to handle RTCP candidates and allowed multiple child elements.

0.11 2008-09-30 psa

Clarified protocol flow.

0.10 2008-09-25 psa
  • Added an ID attribute to the candidate, trying, and received elements for tracking purposes.
  • Specified that trying and received messages must be sent.
  • Modified namespaces to incorporate namespace versioning.
  • Cleaned up XML schemas.
0.9 2007-11-27 psa

Further editorial review.

0.8 2007-11-15 psa

Editorial review and consistency check.

0.7 2007-06-25 psa

More clearly specified the hit-or-miss nature of the transport; corrected informational messages.

0.6 2007-04-17 psa

Specified Jingle conformance, including definition of transport type as datagram; added section on service discovery.

0.5 2007-03-23 psa

Updated to reflect changes to XEP-0166; clarified media data checking.

0.4 2006-12-21 psa

Recommended sending of candidate in initiation request to save a round trip and expedite the negotiation; removed name attribute; clarified flow of negotiation; modified spec to use provisional namespace before advancement to Draft (per XEP-0053).

0.3 2006-10-31 psa

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.

0.2 2006-07-12 se/psa

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

0.1 2006-03-01 psa/jb

Initial version (split from XEP-0166).

&xep0166; 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 application 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 &rfc0768;). This "raw-udp" method results in a datagram transport method suitable for use in media applications where some packet loss is tolerable (e.g., audio and video).

Note: The Raw UDP transport does not provide end-to-end traversal of Network Address Translators (NATs); if NAT traversal is needed, Jingle clients SHOULD use &ice; as described in &xep0176;. The Raw UDP transport method is defined only for the purpose of specifying the IP address and port that an entity considers "most likely to succeed" and is a "hit-or-miss" method that might work end-to-end in some circumstances. However, this method can prove useful when the communications architecture includes intermediate gateways or relays, as described in XEP-0176.

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 parties consider 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.

In accordance with Section 10 of XEP-0166, this document specifies the following information related to the Jingle Raw UDP transport type:

  1. The transport negotiation process is defined in the Protocol Description section of this document.

  2. The semantics of the &TRANSPORT; element are defined in the Transport Initiation section of this document.

  3. Successful negotiation of the Raw UDP method results in use of a datagram transport that is suitable for applications where some packet loss is tolerable, such as audio and video.

  4. If multiple components are to be communicated over the transport in the context of the Real-time Transport Protocol (RTP; see &rfc3550;), the component numbered "1" shall be associated with RTP and the component numbered "2" shall be associated with the Real Time Control Protocol (RTCP).

The overall protocol flow for negotiation of the Jingle Raw UDP Transport Method is as follows (note: many of these events happen simultaneously, not in sequence).

| | ack | |<-----------------------------------| | session-info: trying | |<-----------------------------------| | ack | |----------------------------------->| | transport-info: candidate | |<-----------------------------------| | ack | |----------------------------------->| | session-info: received | |----------------------------------->| | ack | |<-----------------------------------| | session-accept | |<-----------------------------------| | ack | |----------------------------------->| |<========MEDIA NOW FLOWS===========>| | | ]]>

In order for the initiator 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 content type. If the initiator wishes to negotiate the Raw UDP transport for a given content type, it MUST include a &TRANSPORT; child element qualified by the 'urn:xmpp:jingle:transports:raw-udp:0' namespace &VNOTE;, which MUST This is required to avoid a round trip and help expedite the negotiation. include the initiator's Raw UDP candidate via the 'ip', 'port', 'generation', and 'id' attributes of the &CANDIDATE; element. The &TRANSPORT; element MAY include more than one &CANDIDATE; element (typically one for RTP and another for RTCP).

]]>

All attributes are REQUIRED. The 'ip' and 'port' attributes are self-explanatory. 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). The 'id' attribute uniquely identifies this candidate for tracking purposes.

Note: The "Raw UDP candidate" is the candidate that the entity has reason to believe will be most likely to succeed for that content type, and thus is equivalent to the "default" candidate as described in &ice;. This is not necessarily the entity'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 sender needs to classify ahead of time the permissiveness of the NAT or firewall it is behind, if any. It then SHOULD assign the Raw UDP candidate as follows, where the candidate types are as described in ICE:

NAT Type Recommended Raw UDP Candidate Type
None Host candidate
Symmetric (not permissive) Relay candidate
Permissive Server reflexive or peer reflexive candidate discovered via STUN (see &rfc3489; and &rfc3489bis;)

As described in XEP-0166, to acknowledge the session initiation request, the responder returns an IQ-result:

]]>

Once the responder acknowledges the session initiation request, it:

  1. MUST attempt to send media data via UDP to the IP and port specified in the initiator's Raw UDP candidate.
  2. MUST send an informational message of <trying/>.
  3. SHOULD send its own Raw UDP candidate to the initiator via a Jingle "transport-info" message.

These are done simultaneously in order to ensure that a connection can be made, since the initiator's Raw UDP candidate might not result in success.

The responder MUST immediately attempt to send data to the IP and port specified in the initiation request. If all goes well, the data will be received by the initiator and media will flow.

When it attempts to send data to a Raw UDP candidate, a party MUST send an informational message of <trying/>, including the candidate ID for tracking purposes.

]]> ]]>

As noted, the responder SHOULD send its own Raw UDP candidate to the initiator by sending a transport-info message to the initiator, as shown in the following example (notice that this example includes two &CANDIDATE; elements, one for RTP and the other for RTCP).

]]>

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

]]>

Naturally, the initiator SHOULD also attempt to send media to the responder as specified above. This media, too, might or might not get through, but if it does then the other party MUST acknowledge success by sending a <received/> message.

Because delivery of UDP data is not acknowledged (as is TCP data), a party that receives media MUST send an informational message of <received/>, including the candidate ID for tracking purposes.

]]> ]]>

Informational messages are sent within the context of the Raw UDP transport to communicate whether the party has attempted to send media or has received media. The informational message MUST be an IQ-set containing a &JINGLE; element of type "session-info", where the informational message is a payload element qualified by the 'urn:xmpp:jingle:transports:raw-udp:info:0' namespace &VNOTE;. The following payload elements are defined:

Element Meaning
<received/> The party has received media.
<trying/> The party is trying to send media.

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

If an entity supports the Jingle Raw UDP transport, it MUST return a feature of "urn:xmpp:jingle:transports:raw-udp:0" &VNOTE; in response to &xep0030; information requests.

]]> ... ... ]]>

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 &xep0115;. However, if an application has not received entity capabilities information from an entity, it SHOULD use explicit service discovery instead.

In order to secure the data stream that is negotiated via the Jingle ICE-UDP transport, implementations SHOULD use encryption methods appropriate to the transport method and media being exchanged (for details regarding RTP sessions, refer to &xep0167;).

This document requires no interaction with &IANA;.

This specification defines the following XML namespaces:

  • urn:xmpp:jingle:transports:raw-udp:0
  • urn:xmpp:jingle:transports:raw-udp:info:0

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespaces to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

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.

The XMPP Registrar shall include "raw-udp" in its registry of Jingle transport methods. The registry submission is as follows:

raw-udp A method for exchanging data over raw UDP datagrams. datagram XEP-0177 ]]>
]]> ]]>

Thanks to Olivier Crête, Steffen Larsen, Robert McQueen, and Mike Ruprecht for their feedback.