Note: &icecore; has been approved for publication as an RFC but has not yet been published as an RFC. While every effort has been made to keep this document synchronized with &icecore;, the interested reader is referred to &icecore; for a detailed description of the ICE methodology.
The process for ICE negotiation is largely the same in Jingle as it is in ICE. There are several differences:
In accordance with Section 8 of XEP-0166, this document specifies the following information related to the Jingle ice-udp transport method:
+In accordance with Section 10 of XEP-0166, this document specifies the following information related to the Jingle ice-udp transport method:
The transport negotiation process is defined in the Protocol Description section of this document.
The semantics of the &TRANSPORT; element are defined in the ICE Negotiation section of this document.
The overall protocol flow for negotiation of the Jingle ICE-UDP Transport Method is as follows (note: many of these events happen simultaneously, not in sequence). The examples follow the scenario described in Section 17 of &icecore;, except that we substitute the Shakespearean characters "Romeo" and "Juliet" for the generic entities "L" and "R".
+The overall protocol flow for negotiation of the Jingle ICE-UDP Transport Method is as follows (note: many of these events happen simultaneously, not in sequence).
|
@@ -219,25 +231,32 @@ INITIATOR RESPONDER
|<-----------------------------------|
| Jingle ack (XMPP IQ-result) |
|----------------------------------->|
+ |<========MEDIA NOW FLOWS===========>|
| |
]]>
+ Note: The examples in this document follow the scenario described in Section 17 of &icecore;, except that we substitute the Shakespearean characters "Romeo" and "Juliet" for the generic entities "L" and "R".
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. A content type MUST include one transport method. If the initiator wishes to negotiate the ice-udp transport method for an application format, it MUST include an empty &TRANSPORT; child element qualified by the 'urn:xmpp:tmp:jingle:transports:ice-udp' namespace &NSNOTE;.
+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. A content type MUST include one transport method. If the initiator wishes to negotiate the ice-udp transport method for an application format, it MUST include an empty &TRANSPORT; child element qualified by the 'urn:xmpp:jingle:transports:ice-udp:0' namespace &VNOTE;.
Once the responder acknowledges receipt of the session initiation request as shown above, both initiator and responder MUST immediately negotiate connectivity over the ICE transport by exchanging XML-formatted candidate transports for the channel. This negotiation proceeds immediately in order to maximize the possibility that media can be exchanged as quickly as possible.
Note: In order to expedite session establishment, the initiator MAY send transport candidates immediately after sending the "session-initiate" message and before receiving acknowledgement from the responder (i.e., the initiator MUST consider the session to be live even before receiving acknowledgement). Given in-order delivery, the responder should receive such "transport-info" messages after receiving the "session-initiate" message; if not, it is appropriate for the responder to return <unknown-session/> errors since according to its state machine the session does not exist. If either party receives an <unknown-session/> from the other party, it MUST terminate the negotiation and the session.
+Note: In order to expedite session establishment, the initiator MAY send transport candidates immediately after sending the "session-initiate" message and before receiving acknowledgement from the responder (i.e., the initiator MUST consider the session to be live even before receiving acknowledgement). Given in-order delivery as mandated by &xmppcore;, the responder will receive such "transport-info" messages after receiving the "session-initiate" message; if not, it is appropriate for the responder to return <unknown-session/> errors since according to its state machine the session does not exist. If either party receives an <unknown-session/> from the other party, it MUST terminate the negotiation and the session.
Note: See the Security Considerations section of this document regarding the exposure of IP addresses on behalf by the responder's client.
The candidate syntax and negotiation flow are described below.
The first step in negotiating connectivity is for each party to immediately begin sending transport candidates to the other party.
Each candidate or set of candidates shall be sent as <candidate/> children of a &TRANSPORT; element qualified by the 'urn:xmpp:tmp:jingle:transports:ice-udp' namespace. The &TRANSPORT; element shall be sent via a Jingle action of "transport-info" as shown in the examples below.
-Either party MAY include multiple <candidate/> elements in one &TRANSPORT; element. Sending one candidate per transport-info action typically results in a faster negotiation because the candidates most likely to succeed are sent first and it is not necessary to gather all candidates before beginning to send any candidates. Furthermore, because certain candidates may be more "expensive" in terms of bandwidth or processing power, the initiator may not want to advertise their existence unless it is necessary to do so after other candidates have failed.) However, sending multiple candidates in a single "transport-info" action can help to ensure interoperability with entities that implement the SDP offer/answer model described in RFC 3264. An entity SHOULD send one candidate per "transport-info" action and send multiple such actions, instead of sending multiple candidates in a single "transport-info" action; the only exception is if the other party advertises support for the "urn:ietf:rfc:3264" service discovery feature.
-If the responder receives and can successfully process a given candidate or set of candidates, it returns an IQ-result (if not, for example because the candidate data is improperly formatted, it returns an error). Note: The responder is only indicating receipt of the candidate or set of candidates, not telling the initiator that the candidate will be used.
+The first step in negotiating connectivity is for each party to immediately begin sending transport candidates to the other party.
Each candidate or set of candidates shall be sent as <candidate/> children of a &TRANSPORT; element qualified by the 'urn:xmpp:jingle:transports:ice-udp:0' namespace. The &TRANSPORT; element shall be sent via a Jingle action of "transport-info" as shown in the examples below.
+Either party MAY include multiple <candidate/> elements in one &TRANSPORT; element. Sending one candidate per transport-info action typically results in a faster negotiation because the candidates most likely to succeed are sent first and it is not necessary to gather all candidates before beginning to send any candidates. Furthermore, because certain candidates can be more "expensive" in terms of bandwidth or processing power, the initiator might not want to advertise their existence unless it is necessary to do so after other candidates have failed. However, sending multiple candidates in a single "transport-info" action can help to ensure interoperability with entities that implement the SDP offer/answer model described in RFC 3264. An entity SHOULD send one candidate per "transport-info" action and send multiple such actions, instead of sending multiple candidates in a single "transport-info" action; the only exception is if the other party advertises support for the "urn:ietf:rfc:3264" service discovery feature as described in the SDP Offer / Answer Support section of this document.
+If the responder receives and can successfully process a given candidate or set of candidates, it returns an IQ-result (if not, for example because the candidate data is improperly formatted, it returns an IQ-error). Note: The responder is only indicating receipt of the candidate or set of candidates, not telling the initiator that the candidate will be used.
The initiator keeps sending candidates (without stopping to receive an acknowledgement of receipt from the responder for each candidate) until it has exhausted its supply of possible or desirable candidate transports. For each candidate or set of candidates, the responder acknowledges receipt.
At the same time (i.e., immediately after acknowledging receipt of the session-initiate request, not waiting for the initiator to begin or finish sending candidates), the responder also begins sending potential candidates, in order of desirability according to the responder. As above, the initiator acknowledges receipt of the candidates.
As above for the candidates sent by the responder, here the initiator acknowledges receipt of the candidates sent by the responder.
+As above for the candidates sent by the initiator, here the initiator acknowledges receipt of the candidates sent by the responder.
When it receives a STUN Binding Request, each party MUST return a STUN Binding Response, which may indicate either an error case or the success case. As described in Section 7.1.2.2 of &icecore;, a connectivity check succeeds if the STUN transaction generated a success response, the source IP address and port of the response equals the destination IP address and port that the Binding Request was sent to, and the destination IP address and port of the response match the source IP address and port that the Binding Request was sent from.
+When it receives a STUN Binding Request, each party MUST return a STUN Binding Response, which indicates either an error case or the success case. As described in Section 7.1.2.2 of &icecore;, a connectivity check succeeds if all of the following are true:
+For the candidates exchanged in the previous section, the connectivity checks would be as follows. In particular, the parties send one STUN Binding Request from each of their local candidates to each of the remote candidates.
|
+ |==============Media Now Can Flow==============>|
| | |
| | STUN Binding Request |
| | from 192.0.2.1:3478 |
@@ -556,7 +580,7 @@ INITIATOR NAT RESPONDER
| | map 192.0.2.1:3478 |
| |======================>|
| | |
- |<===============RTP now can flow===============|
+ |==============Media Now Can Flow==============>|
| | |
]]>
Note: Here the initiator (controlling agent) is using "aggressive nomination" as described in Section 8.1.1.2 of &icecore; and therefore includes the USE-CANDIDATE attribute in the STUN Binding Requests it sends.
@@ -573,16 +597,17 @@ INITIATOR NAT RESPONDER id='accept1' to='romeo@montague.net/orchard' type='set'> -Now the initiator and responder can begin sending data over the negotiated connection (in fact, they could have sent data as soon as the connectivity checks succeeded, as shown in the preceding examples).
+Now the initiator and responder can begin sending media data over the negotiated connection (in fact, they could have sent data as soon as the connectivity checks succeeded, as shown in the preceding examples).
If a candidate succeeded for the responder but the initiator cannot send data over that candidate, it MUST return a ¬acceptable; error in response to the responder's acceptance of the successful candidate:
If the responder cannot find a suitable candidate transport or it receives a ¬acceptable; error from the initiator in response to its acceptance of a suitable transport, it SHOULD terminate the session as described in Section 6.8 of XEP-0166.
+If the responder cannot find a suitable candidate transport or it receives a ¬acceptable; error from the initiator in response to its acceptance of a suitable transport, it SHOULD terminate the session as described in Section 6.7 of XEP-0166.
The creator of a content type MAY modify an existing, in-use candidate at any time during the session, for example to change the IP address or port. This is done by sending a transport-replace action with the changed candidate information, where the value of the 'generation' is incremented to specify that the candidate information is a modification to an existing candidate.
+The creator of a content type MAY modify an existing, in-use candidate at any time during the session, for example to change the IP address or port. This is done by sending a transport-replace action with the changed candidate information, where the value of the 'generation' attribute is incremented to specify that the candidate information is a modification to an existing candidate.
An example follows (change to IP address and port).
It can happen that the responder does not support ICE, in which case it can be necessary to fall back to use of the &xep0177;. One typical scenario is communication between an ICE-aware Jingle endpoint and a non-ICE-aware SIP endpoint through a Jingle-to-SIP gateway, as follows:
+The session flow is as follows.
+| |
+ | ack | |
+ |<------------------------| |
+ | content-add | |
+ | (Raw UDP) | |
+ |<------------------------| |
+ | ack | |
+ |------------------------>| |
+ | content-accept | |
+ |------------------------>| |
+ | ack | |
+ |<------------------------| SIP INVITE |
+ | |------------------------>|
+ | | 200 OK |
+ | |<------------------------|
+ | session-accept | |
+ |<------------------------| |
+ | ack | |
+ |------------------------>| |
+ | MEDIA SESSION |
+ |<=================================================>|
+ | | session-terminate |
+ | |<------------------------|
+ | session-terminate | |
+ |<------------------------| |
+ | ack | |
+ |------------------------>| ack |
+ | |------------------------>|
+ | | |
+ ]]>
+ The protocol flow is as follows, showing only the stanzas sent between Romeo and the gateway (acting on Juliet's behalf).
+Immediately the gateway sends a content-add action to Romeo, specifying a transport of Raw UDP with a candidate whose IP address and port identify a media relay at the gateway.
+Romeo then acknowledges the content-add action and immediately also sends a content-accept.
+The gateway then acknowledges the acceptance on behalf of Juliet.
+Now the gateway removes the old content definition based on the ICE-UDP transport.
+Romeo then acknowledges the content-replace action.
+Eventually, the responder sends a session-accept.
+The endpoints now begin to exchange session media.
+The endpoints can continue the session as long as desired.
+Eventually, one of the endpoints terminates the session.
+The other party then acknowledges termination of the session:
+If an entity supports the Jingle ice-udp transport, it MUST return a feature of "urn:xmpp:tmp:jingle:transports:ice-udp" &NSNOTE; in response to &xep0030; information requests.
+If an entity supports the Jingle ice-udp transport, it MUST return a feature of "urn:xmpp:jingle:transports:ice-udp:0" &VNOTE; in response to &xep0030; information requests.
Naturally, support MAY also be determined via the dynamic, presence-based profile of Service Discovery defined in &xep0115;.
+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.
If an entity supports the SDP offer / answer model described in RFC 3264 and therefore prefers to receive multiple candidates in a single "transport-info" action, it MUST advertise support for the "urn:ietf:rfc:3264" service discovery feature. Typically this feature will be advertised only by gateways between Jingle and SIP.
@@ -853,7 +1105,7 @@ INITIATOR NAT RESPONDERIn order to speed the negotiation process so that media can flow as quickly as possible, the initiatior should gather and prioritize candidates in advance, or as soon as the principal begins the process of initiating a session.
-The protocol-level "session-accept" action is not to be confused with an interface-level acceptance of the session request. After receiving and acknowledging the "session-initiate" action received from the initiator, the responder's client should present an interface element that enables a human user to explicitly agree to proceeding with the session (e.g., an "Accept Incoming Call?" pop-up window including "Yes" and "No" buttons). However, the responder's client should not return a "session-accept" action to the initiator until the responder has explicitly agreed to proceed with the session (unless the initiator is on a list of entities whose sessions are automatically accepted).
+In order to speed the negotiation process so that media can flow as quickly as possible, the initiator SHOULD gather and prioritize candidates in advance, or as soon as the principal begins the process of initiating a session.
+The protocol-level "session-accept" action is not to be confused with an interface-level acceptance of the session request. After receiving and acknowledging the "session-initiate" action received from the initiator, the responder's client SHOULD present an interface element that enables a human user to explicitly agree to proceeding with the session (e.g., an "Accept Incoming Call?" pop-up window including "Yes" and "No" buttons). However, the responder's client SHOULD NOT return a "session-accept" action to the initiator until the responder has explicitly agreed to proceed with the session (unless the initiator is on a list of entities whose sessions are automatically accepted).
This specification applies exclusively to Jabber/XMPP clients and places no additional requirements on Jabber/XMPP servers. However, service administrators may wish to deploy a STUN server in order to ease the client-to-client negotiation process. See &xep0215; for related information.
+This specification applies exclusively to Jabber/XMPP clients and places no additional requirements on Jabber/XMPP servers. However, service administrators might wish to deploy a STUN server in order to ease the client-to-client negotiation process. See &xep0215; for related information.
By definition, the exchange of transport candidates results in exposure of the sender's IP addresses, which comprise a form of personally identifying information. A Jingle client MUST enable a user to control which entities will be allowed to receive such information. If a human user explicitly accepts a session request, then the client should consider that action to imply approval of IP address sharing. However, waiting for a human user to explicitly accept the session request can result in delays during session setup, since it is more efficient to immediately begin sharing transport candidates. Therefore, it is RECOMMENDED for the client to immediately send transport candidates to a contact (without waiting for explicit user approval of the session request) in the following cases:
+By definition, the exchange of transport candidates results in exposure of the sender's IP addresses, which comprise a form of personally identifying information. A Jingle client MUST enable a user to control which entities will be allowed to receive such information. If a human user explicitly accepts a session request, then the client SHOULD consider that action to imply approval of IP address sharing. However, waiting for a human user to explicitly accept the session request can result in delays during session setup, since it is more efficient to immediately begin sharing transport candidates. Therefore, it is RECOMMENDED for the client to immediately send transport candidates to a contact (without waiting for explicit user approval of the session request) in the following cases:
Until this specification advances to a status of Draft, its associated namespaces shall be:
+This specification defines the following XML namespace:
Upon advancement of this specification, the ®ISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.
-The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:
-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.
If an entity supports the SDP offer / answer model described in RFC 3264 and therefore prefers to receive one "transport-info" action with multiple candidates, it MUST advertise support for the "urn:ietf:rfc:3264" feature.
@@ -906,7 +1157,10 @@ INITIATOR NAT RESPONDER
urn:ietf:rfc:3264
- Signals support for the SDP offer / answer model described in RFC 3264
+
+ Signals support for the SDP offer / answer model
+ described in RFC 3264
+
XEP-0176
]]>
@@ -917,9 +1171,10 @@ INITIATOR NAT RESPONDER