1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@291 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2006-12-21 21:25:58 +00:00
parent a12d6e5960
commit ce6655724b
2 changed files with 113 additions and 63 deletions

View File

@ -10,7 +10,7 @@
<abstract>This document defines a Jingle transport method that results in sending data over a raw User Datagram Protocol (UDP) connection.</abstract>
&LEGALNOTICE;
<number>0177</number>
<status>Proposed</status>
<status>Experimental</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<approver>Council</approver>
@ -20,29 +20,35 @@
</dependencies>
<supersedes/>
<supersededby/>
<shortname>raw-udp</shortname>
<shortname>TO BE ASSIGNED</shortname>
&joebeda;
&stpeter;
&scottlu;
&hildjj;
&seanegan;
<revision>
<version>0.4</version>
<date>2006-12-21</date>
<initials>psa</initials>
<remark><p>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).</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2006-10-31</date>
<initials>psa</initials>
<remark>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.</remark>
<remark><p>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.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2006-07-12</date>
<initials>se/psa</initials>
<remark>Removed candidate element and specified exchange of address information via transport-info messages; clarified usage of name attribute.</remark>
<remark><p>Removed candidate element and specified exchange of address information via transport-info messages; clarified usage of name attribute.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2006-03-01</date>
<initials>psa/jb</initials>
<remark>Initial version (split from XEP-0166).</remark>
<remark><p>Initial version (split from XEP-0166).</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
@ -51,73 +57,113 @@
<section1 topic='Requirements' anchor='reqs'>
<p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
<ol>
<li>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.</li>
<li>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.</li>
<li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
<li>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.</li>
</ol>
<p>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, &xep0176; SHOULD be used.</p>
</section1>
<section1 topic='Protocol Description' anchor='protocol'>
<section2 topic='Transport Initiation' anchor='protocol-initiate'>
<p>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 <cite>XEP-0166</cite>. 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.</p>
<section2 topic='Transport Initiation' anchor='initiate'>
<p>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 <cite>XEP-0166</cite>. This stanza MUST include at least one content type. If the initiating entity wishes to negotiate the Raw UDP transport for a given content type, it MUST include a &TRANSPORT; child element qualified by the 'http://www.xmpp.org/extensions/xep-0177.html#ns' namespace (see <link url='#ns'>Protocol Namespaces</link>), which MUST <note>This is required to avoid a round trip and help expedite the negotiation.</note> include the initiating entity's Raw UDP candidate via the 'ip', 'port', 'generation', and 'name' attributes of the &CANDIDATE; element.</p>
<example caption="Initiation Example"><![CDATA[
<iq to='juliet@capulet.com/balcony' from='romeo@montague.net/orchard' id='jingle1' type='set'>
<jingle xmlns='http://jabber.org/protocol/jingle'
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jingle1' type='set'>
<jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
action='session-initiate'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<content name='this-is-the-audio-content'>
<content creator='romeo@montague.net' name='this-is-the-audio-content'>
<description ...>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'/>
</content>
</jingle>
</iq>
]]></example>
</section2>
<section2 topic='Receiver Response' anchor='protocol-response'>
<p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the receiver returns an IQ-result:</p>
<example caption="Receiver Provisionally Accepts the Session Request"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='result' id='jingle1'/>
]]></example>
</section2>
<section2 topic='Exchanging Address Information' anchor='protocol-addresses'>
<p>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 &rfc3489;, which will be an address on the outside of the firewall or NAT.</p>
<p>Note: The Raw UDP candidate is equivalent to the "in-use" candidate as described in &ice;. (In older versions of XEP-0166, this was referrred to as the "default candidate".)</p>
<example caption="Address Exchange Example"><![CDATA[
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jingle2' type='set'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='transport-info'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<content name='this-is-the-audio-content'>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
<candidate name='myvoicedata' ip='10.1.1.104' port='13540' generation='0'/>
<transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'>
<candidate ip='10.1.1.104' port='13540' generation='0'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>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).</p>
<p>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 <link url='#protocol-info'>Informational Messages</link> 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.</p>
<example caption="Responder Returns Transport-Accept"><![CDATA[
<p>The 'generation', 'ip', and 'port' 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).</p>
<p>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 "in-use" candidate as described in &ice;. <note>In older versions of XEP-0166, this was referrred to as the "default candidate".</note> 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 client needs 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 <cite>ICE</cite>:</p>
<table caption='Raw UDP Candidate Assignment'>
<tr>
<th>NAT Type</th>
<th>Recommended Raw UDP Candidate Type</th>
</tr>
<tr>
<td>None</td>
<td>Host candidate</td>
</tr>
<tr>
<td>Symmetric (not permissive)</td>
<td>Relay candidate</td>
</tr>
<tr>
<td>Permissive</td>
<td>Server reflexive or peer reflexive candidate discovered via &rfc3489;</td>
</tr>
</table>
</section2>
<section2 topic='Receiving Entity Response' anchor='response'>
<p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the receiver returns an IQ-result:</p>
<example caption="Receiving Entity Provisionally Accepts the Session Request"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='result' id='jingle1'/>
]]></example>
<p>Once the receiving entity provisionally accepts the session, it:</p>
<ul>
<li>MUST check the initiating entity's Raw UDP candidate by attempting to send media data to the specified IP and port.</li>
<li>SHOULD send its own Raw UDP candidate to the initiating entity via a Jingle "transport-info" message.</li>
<li>MAY send an informational message.</li>
</ul>
<p>These are done simultaneously in order to ensure that a connection can be made, since the initiating entity's Raw UDP candidate may not result in success.</p>
<section3 topic='Checking the Initiating Entity&apos;s Candidate' anchor='response-check'>
<p>The receiving entity MUST immediately attempt to send media data to the IP and port specified in the initiation request. If media data can be delivered, the recipient MUST send a Jingle "transport-accept" action to the initiator (either explicitly, or implicitly via a "content-accept" or "session-accept" action.</p>
<example caption="Receiving Entity Returns Transport-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept1'>
<jingle xmlns='http://jabber.org/protocol/jingle'
<jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
action='transport-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<content name='this-is-the-audio-content'>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
<content creator='romeo@montague.net' name='this-is-the-audio-content'>
<transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'>
<candidate name='myvoicedata' ip='10.1.1.104' port='13540' generation='0'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>The initiator MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).</p>
]]></example>
<p>The initiating entity MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).</p>
<example caption="Initiating Entity Acknowledges Transport Accept"><![CDATA[
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' type='result' id='accept1'/>
]]></example>
</section3>
<section3 topic='Sending A Candidate' anchor='response-candidate'>
<p>While checking the initiating entity's Raw UDP candidate, the receiving entity SHOULD its own Raw UDP candidate to the initiating entity by sending a transport-info message to the initiating entity, as shown in the following example.</p>
<example caption="Receiving Entity Sends Its Raw UDP Candidate"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' id='jingle2' type='set'>
<jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
action='transport-info'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<content creator='romeo@montague.net' name='this-is-the-audio-content'>
<transport xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'>
<candidate ip='208.245.212.67' port='9876' generation='0'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>The initiating entity MUST then acknowledge receipt by returning an IQ result (or return a standard XMPP error).</p>
<example caption="Initiating Entity Acknowledges Receipt of Candidate"><![CDATA[
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' type='result' id='jingle2'/>
]]></example>
<p>Naturally, the intiating entity then MUST also check the receiving entity's Raw UDP candidate by following the checking procedure outlined above.</p>
</section3>
<section3 topic='Sending An Informational Message' anchor='response-info'>
<p>While checking the initiating entity's Raw UDP candidate, the receiving entity MAY send an informational message 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 specified in the <link url='#info'>Informational Messages</link> section of this document.</p>
</section3>
</section2>
<section2 topic='Informational Messages' anchor='protocol-info'>
<p>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:</p>
<p>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://www.xmpp.org/extensions/xep-0177.html#ns-info' namespace (see <link url='#ns'>Protocol Namespaces</link>). The following payload elements are defined:</p>
<table caption='Information Payload Elements'>
<tr>
<th>Element</th>
@ -151,12 +197,11 @@
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/jingle/transport/raw-udp' in its registry of protocol namespaces.</p>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>Until this specification advances to a status of Draft, its associated namespaces shall be "http://www.xmpp.org/extensions/xep-0177.html#ns" and "http://www.xmpp.org/extensions/xep-0177.html#ns-info"; upon advancement of this specification, the &REGISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.</p>
</section2>
<section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
<p>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:</p>
&REGPROCESS;
<p>The XMPP Registrar shall include "raw-udp" in its registry of Jingle transport methods. The registry submission is as follows:</p>
<code><![CDATA[
<transport>
<name>raw-udp</name>
@ -172,8 +217,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/jingle/transport/raw-udp'
xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'
targetNamespace='http://www.xmpp.org/extensions/xep-0177.html#ns'
xmlns='http://www.xmpp.org/extensions/xep-0177.html#ns'
elementFormDefault='qualified'>
<xs:element name='transport'>
@ -189,7 +234,6 @@
<xs:simpleContent>
<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:extension>

View File

@ -20,13 +20,19 @@
</dependencies>
<supersedes/>
<supersededby/>
<shortname>jingle-video</shortname>
<shortname>TO BE ASSIGNED</shortname>
&stpeter;
<author>
<firstname>Milton</firstname>
<surname>Chen</surname>
<email>Milton.Chen@vseelab.com</email>
</author>
<revision>
<version>0.4</version>
<date>2006-12-21</date>
<initials>psa</initials>
<remark><p>Modified spec to use provisional namespace before advancement to Draft (per XEP-0053).</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2006-08-23</date>
@ -66,7 +72,7 @@
<section1 topic='Content Description Format' anchor='format'>
<p>A Jingle video session is described by one or more encodings contained within a wrapper &DESCRIPTION; element. In the language of <cite>RFC 4566</cite> these encodings are payload-types; therefore, each &lt;payload-type/&gt; child element specifies an encoding that can be used for the video stream. Such encodings are often used in the context of the Real-time Transfer Protocol (RTP; see &rfc3550;) but may be used in other contexts as well. The most common encodings for the Audio/Video Profile (AVP) of RTP are listed in &rfc3551; (these "static" types are reserved from payload ID 0 through payload ID 96), although other encodings are allowed (these "dynamic" types use payload IDs 97 to 127) in accordance with the dynamic assignment rules described in Section 3 of <cite>RFC 3551</cite>. The &PAYLOADTYPE; element's 'id' attribute is REQUIRED and its 'name' attribute is RECOMMENDED. The encodings SHOULD be provided in order of preference.</p>
<example caption="Video Description Format"><![CDATA[
<description xmlns='http://jabber.org/protocol/jingle/description/video'>
<description xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns/description/video'>
<payload-type id='18' name='G729'/>
<payload-type id='97' name='IPCMWB'/>
<payload-type id='98' name='L16' transparent='true'/>
@ -132,7 +138,7 @@
<p>To follow.</p>
</section1>
<section1 topic='Service Discovery' anchor='disco'>
<p>If an entity supports the Jingle video content description format, it MUST advertise that fact by returning a feature of "http://jabber.org/protocol/jingle/description/video" in response to &xep0030; information requests.</p>
<p>If an entity supports the Jingle video content description format, it MUST advertise that fact by returning a feature of "http://www.xmpp.org/extensions/xep-0166.html#ns/description/video" in response to &xep0030; information requests.</p>
<example caption="Service Discovery Information Request"><![CDATA[
<iq from='romeo@montague.net/orchard'
id='disco1'
@ -148,15 +154,15 @@
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/jingle'/>
<feature var='http://jabber.org/protocol/jingle/description/video'/>
<feature var='http://www.xmpp.org/extensions/xep-0166.html#ns'/>
<feature var='http://www.xmpp.org/extensions/xep-0166.html#ns/description/video'/>
...
</query>
</iq>
]]></example>
</section1>
<section1 topic='Informational Messages' anchor='info'>
<p>Informational messages may be sent by either party within the context of Jingle to communicate the status of a Jingle video session, device, or principal. The informational message MUST be an IQ-set containing a &JINGLE; element of type "content-info", where the informational message is a payload element qualified by the 'http://jabber.org/protocol/jingle/info/video' namespace. No payload elements have yet been defined, but will be specified in a future version of this document.</p>
<p>Informational messages may be sent by either party within the context of Jingle to communicate the status of a Jingle video session, device, or principal. The informational message MUST be an IQ-set containing a &JINGLE; element of type "content-info", where the informational message is a payload element qualified by the 'http://www.xmpp.org/extensions/xep-0166.html#ns/info/video' namespace. No payload elements have yet been defined, but will be specified in a future version of this document.</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<section2 topic='Codecs' anchor='impl-codecs'>
@ -170,16 +176,16 @@
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/jingle/description/video' and 'http://jabber.org/protocol/jingle/info/video' in its registry of protocol namespaces.</p>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>Until this specification advances to a status of Draft, its associated namespaces shall be "http://www.xmpp.org/extensions/xep-0180.html#ns" and "http://www.xmpp.org/extensions/xep-0180.html#ns-info"; upon advancement of this specification, the &REGISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.</p>
</section2>
<section2 topic='Jingle Content Description Formats' anchor='registrar-content'>
<p>The XMPP Registrar shall include the name "video" in its registry of Jingle content description formats. The registration is as follows:</p>
<p>The XMPP Registrar shall include "video" in its registry of Jingle content description formats. The registry submission is as follows:</p>
<code><![CDATA[
<content>
<name>video</name>
<desc>Jingle sessions that support video exchanges</desc>
<doc>XEP-xxxx</doc>
<doc>XEP-0180</doc>
</content>
]]></code>
</section2>
@ -191,8 +197,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/jingle/description/video'
xmlns='http://jabber.org/protocol/jingle/description/video'
targetNamespace='http://www.xmpp.org/extensions/xep-0166.html#ns/description/video'
xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns/description/video'
elementFormDefault='qualified'>
<xs:element name='description'>