1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00

copy edit

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1405 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2007-11-20 17:18:17 +00:00
parent ce06980ec7
commit aaed812202

View File

@ -238,7 +238,10 @@ Romeo Juliet
<p>Naturally, more complex scenarios are probable; such scenarios are described in other specifications, such as <cite>XEP-0167</cite> for voice chat.</p>
<p>The simplest flow might happens as follows. The example is that of a voice chat (see <cite>XEP-0167</cite>) initiated by Romeo, where the transport is &xep0177;.</p>
<example caption="Initiator sends session-initiate"><![CDATA[
<iq from='romeo@montague.lit/orchard' to='juliet@capulet.lit/balcony' id='jingle1' type='set'>
<iq from='romeo@montague.lit/orchard'
id='jingle1'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
action='session-initiate'
initiator='romeo@montague.lit/orchard'
@ -258,14 +261,18 @@ Romeo Juliet
</jingle>
</iq>
]]></example>
<example caption="Receiver sends provisional acceptance"><![CDATA[
<example caption="Receiver acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>If the proposed session is acceptable, the responder definitively accepts it.</p>
<example caption="Receiver sends session-accept"><![CDATA[
<iq type='set' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='accept1'>
<iq from='juliet@capulet.lit/balcony'
id='accept1'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns'
action='session-accept'
initiator='romeo@montague.lit/orchard'
@ -288,7 +295,14 @@ Romeo Juliet
</jingle>
</iq>
]]></example>
<p>If the foregoing payload types and transport candidates can be successfully used, then the parties would begin to exchange media. In this case they would exchange audio using the Speex codec at a clockrate of 8000 since that is the highest-priority codec for the responder (as determined by the XML order of the &PAYLOADTYPE; children).</p>
<p>The initiator then acknowledges the session-accept message.</p>
<example caption="Initiator acknowledges session-accept"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept1'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<p>The parties then begin to exchange media. In this case they would exchange audio using the Speex codec at a clockrate of 8000 since that is the highest-priority codec for the responder (as determined by the XML order of the &PAYLOADTYPE; children).</p>
<p>The parties may continue the session as long as desired.</p>
<p>Eventually, one of the parties terminates the session.</p>
<example caption="Receiver terminates the session"><![CDATA[
@ -319,13 +333,13 @@ Romeo Juliet
<li>When a peer-to-peer connection cannot be negotiated, make it possible to fall back to relayed communications.</li>
<li>Clearly separate the signalling channel (XMPP) from the data channel.</li>
<li>Clearly separate the application formats (e.g., video) from the transport methods (e.g., RTP).</li>
<li>Make it possible to add, modify, and remove both media types and transport methods in relation to an existing session.</li>
<li>Make it possible to add, modify, and remove both application types and transport methods in relation to an existing session.</li>
<li>Make it relatively easy to implement support for the protocol 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>This document defines the signalling protocol only. Additional documents specify the following:</p>
<ul>
<li><p>Various application formats (audio, video, etc.) and, where possible, mapping those types to the Session Description Protocol (SDP; see &rfc4566;); examples include <cite>Jingle Audio via RTP</cite> and <cite>Jingle Video via RTP</cite>.</p></li>
<li><p>Various application formats (audio, video, etc.) and, where possible, mapping of those types to the Session Description Protocol (SDP; see &rfc4566;); examples include <cite>Jingle Audio via RTP</cite> and <cite>Jingle Video via RTP</cite>.</p></li>
<li><p>Various transport methods; examples include &xep0176; and <cite>Raw UDP Transport</cite>.</p></li>
<li><p>Procedures for mapping the Jingle signalling protocol to existing signalling standards such as the IETF's Session Initiation Protocol (SIP) and the ITU's H.323 protocol (see &h323;); these documents are forthcoming.</p></li>
</ul>
@ -374,14 +388,14 @@ Romeo Juliet
<li>Application types (the "what")</li>
<li>Transport methods (the "how")</li>
</ol>
<p>This document defines the semantics and syntax for overall session management. It also provides pluggable "slots" for application formats and transport methods, which are specified in separate documents; however, for the sake of completeness, this document also includes examples for all actions related to application formats and transport methods.</p>
<p>This document defines the semantics and syntax for overall session management. It also provides pluggable "slots" for application formats and transport methods, which are specified in separate documents.</p>
<p>At the most basic level, the process for negotiating a Jingle session is as follows:</p>
<ol>
<li>One user (the "initator") sends to another user (the "receiver") a session request with at least one content type.</li>
<li>If the receiver wants to proceed, it provisionally accepts the request by sending an IQ result.</li>
<li>Both the initiator and receive start exchanging possible transport candidates as quickly as possible (these are sent in quick succession before further negotiation in order to minimize the time required before media data can flow).</li>
<li>One user (the "initator") sends to another user (the "responder") a session request with at least one content type.</li>
<li>If the responder wants to proceed, it provisionally accepts the request by sending an IQ result.</li>
<li>Both the initiator and responder start exchanging possible transport candidates as quickly as possible (these are sent in quick succession before further negotiation in order to minimize the time required before media data can flow).</li>
<li>These candidates are checked for connectivity.</li>
<li>As soon as the receiver finds a candidate over which media can flow, the receiver sends to the initiator a "session-accept" action.</li>
<li>As soon as the responder finds a candidate over which media can flow, the responder sends to the initiator a "session-accept" action.</li>
<li>The parties start sending media over the negotiated candidate.</li>
</ol>
<p>If the parties later discover a better candidate, they perform a "content-modify" negotiation and then switch to the better candidate. Naturally they can also modify various other parameters related to the session (e.g., adding video to a voice chat).</p>
@ -437,15 +451,15 @@ PENDING o---------------------+ |
</tr>
<tr>
<td>content-add</td>
<td>Add one or more new content types to the session. The sender MUST specify only the added content-type(s), not the added content-type(s) plus the existing content-type(s). Therefore it is the responsibility of the recipient to maintain a local copy of the content type definition. This action MUST NOT be sent while the session is in the PENDING state. When a party sends a content-add, it MUST ignore any actions received from the other party until it receives acknowledgement of the content-add. <note>In the event that a session contains two unidirectional streams of the same type because a content-add was issued simultaneously by both parties, it is RECOMMENDED that participants close the duplicate stream in favour of that created by the session initiator, which should be made bidirectional with a 'content-modify' action by the responder.</note></td>
<td>Add one or more new content types to the session. The sender MUST specify only the added content-type(s), not the added content-type(s) plus the existing content-type(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content type definition. This action MUST NOT be sent while the session is in the PENDING state. When a party sends a content-add, it MUST ignore any actions received from the other party until it receives acknowledgement of the content-add. <note>In the event that a session contains two unidirectional streams of the same type because a content-add was issued simultaneously by both parties, it is RECOMMENDED that participants close the duplicate stream in favour of that created by the session initiator, which should be made bidirectional with a 'content-modify' action by the responder.</note></td>
</tr>
<tr>
<td>content-modify</td>
<td>Change an existing content type. The sender SHOULD specify only the aspects for which a modification is desired (e.g., if the sender wishes to change only the profile then it would send an empty &lt;content/&gt; element with a modified value for the 'profile' attribute; if the wishes to change only the transport, then it would send a &lt;content/&gt; element that contains only a &lt;transport/&gt; child; etc.). Therefore it is the responsibility of the recipient to maintain a local copy of the content type definition. The recipient MUST NOT reply to a content-modify action with another content-modify action. <note>If both parties send modify messages at the same time, the modify message from the session initiator MUST trump the modify message from the recipient and the initiator SHOULD return an &unexpected; error to the other party.</note></td>
<td>Change an existing content type. The sender SHOULD specify only the aspects for which a modification is desired (e.g., if a party wishes to change only the profile then it would send an empty &lt;content/&gt; element with a modified value for the 'profile' attribute; if a party wishes to change only the transport, then it would send a &lt;content/&gt; element that contains only a &lt;transport/&gt; child; etc.). Therefore it is the responsibility of the recipient to maintain a local copy of the current content type definition. The recipient MUST NOT reply to a content-modify action with another content-modify action. <note>If both parties send modify messages at the same time, the modify message from the session initiator MUST trump the modify message from the recipient and the initiator SHOULD return an &unexpected; error to the other party.</note></td>
</tr>
<tr>
<td>content-remove</td>
<td>Remove one or more content types from the session. The sender MUST specify only the removed content-type(s), not the removed content-type(s) plus the remaining content-type(s). Therefore it is the responsibility of the recipient to maintain a local copy of the content type definition. <note>A client MUST NOT return an error upon receipt of a 'content-remove' action for a content type that is received after a 'content-remove' action has been sent but before the action has been acknowledged by the peer.</note> <note>If the content-remove results in no more content types for the session, the entity that receives the content-remove SHOULD send a session-terminate action to the other party (since a session with no content types is void).</note></td>
<td>Remove one or more content types from the session. The sender MUST specify only the removed content-type(s), not the removed content-type(s) plus the remaining content-type(s). Therefore it is the responsibility of the recipient to maintain a local copy of the current content type definition. <note>A client MUST NOT return an error upon receipt of a 'content-remove' action for a content type that is received after a 'content-remove' action has been sent but before the action has been acknowledged by the peer.</note> <note>If the content-remove results in zero content types for the session, the entity that receives the content-remove SHOULD send a session-terminate action to the other party (since a session with no content types is void).</note></td>
</tr>
<tr>
<td>session-accept</td>
@ -473,7 +487,7 @@ PENDING o---------------------+ |
<section1 topic='Session Flow' anchor='session'>
<p>This section defines the high-level flow of a Jingle session. More detailed descriptions are provided in the specifications for Jingle application formats and transport methods.</p>
<section2 topic='Resource Determination' anchor='session-resource'>
<p>In order to initiate a Jingle session, the initiator must determine which of the receiver's XMPP resources is best for the desired application format. There are several possible scenarios:</p>
<p>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. There are several possible scenarios:</p>
<ol>
<li><p>If the intended responder shares presence with the initiator (see &xmppim;) and has only one available resource, the initiator SHOULD attempt to negotiate a Jingle session with that resource unless the initiator knows via &xep0030; or &xep0115; that the resource does not support Jingle and the desired application format. <note>Naturally, instead of sending service discovery requests to every contact in a user's roster, it is more efficient to use <cite>Entity Capabilities</cite>, 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 <cite>XEP-0115</cite> for details.</note></p></li>
<li><p>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.</p></li>
@ -482,78 +496,99 @@ PENDING o---------------------+ |
</ol>
</section2>
<section2 topic='Initiation' anchor='protocol-initiate'>
<p>Once the initiator has discovered which of the receiver's XMPP resources is ideal for the desired application format, it sends a session initiation request to the receiver. This request is an IQ-set containing a &JINGLE; element qualified by the 'http://www.xmpp.org/extensions/xep-0166.html#ns' namespace &NSNOTE;, where the value of the 'action' attribute is "session-initiate" and where the &JINGLE; element contains one or more &CONTENT; elements. Each &CONTENT; element defines a content type to be transferred during the session, and each &CONTENT; element in turn contains one &DESCRIPTION; child element that specifies a desired application format and one &TRANSPORT; child element that specifies a potential transport method. If either party wishes to propose the use of multiple transport methods for the same application format, it must send multiple &CONTENT; elements.</p>
<p>Once the initiator has discovered which of the responder's XMPP resources is ideal for the desired application format, it sends a session initiation request to the responder. This request is an IQ-set containing a &JINGLE; element qualified by the 'http://www.xmpp.org/extensions/xep-0166.html#ns' namespace &NSNOTE;, where the value of the 'action' attribute is "session-initiate" and where the &JINGLE; element contains one or more &CONTENT; elements. Each &CONTENT; element defines a content type to be transferred during the session, and each &CONTENT; element in turn contains one &DESCRIPTION; child element that specifies a desired application format and one &TRANSPORT; child element that specifies a potential transport method. If either party wishes to propose the use of multiple transport methods for the same application format, it must send multiple &CONTENT; elements.</p>
<p>Note: The syntax and semantics of the &DESCRIPTION; and &TRANSPORT; elements are out of scope for this specification, since they are defined in related specifications. The syntax and semantics of the &JINGLE; and &CONTENT; elements are specified in this document under <link url='#def'>Formal Definition</link>.</p>
<p>Note: In order to expedite session establishment, the initiator MAY send transport candidates (e.g., for negotiation of the ICE transport) immediately after sending the "session-initiate" message and before receiving acknowledgement from the receiver (i.e., the initiator MUST consider the session to be live even before receiving acknowledgement). Given in-order delivery, the receiver should receive such "transport-info" messages after receiving the "session-initiate" message (if not, it is appropriate for the receiver to return &lt;unknown-session/&gt; errors since it according to its state machine the session does not exist).</p>
<p>Note: In order to expedite session establishment, the initiator MAY send transport candidates (e.g., for negotiation of the ICE transport) immediately after sending the "session-initiate" message and before receiving acknowledgement from the responder (i.e., the initiator MUST consider the session to be PENDING 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 &lt;unknown-session/&gt; errors since according to its state machine the session does not exist).</p>
</section2>
<section2 topic='Receiver Response' anchor='protocol-response'>
<p>Unless an error occurs, the receiver MUST acknowledge receipt of the initiation request.</p>
<p>If the receiver acknowledges receipt of the initation request, both parties must consider the session to be in the PENDING state.</p>
<p>There are several reasons why the receiver might return an error instead of acknowledging receipt of the initiation request:</p>
<p>Unless an error occurs, the responder MUST acknowledge receipt of the initiation request.</p>
<p>If the responder acknowledges receipt of the initation request, both parties must consider the session to be in the PENDING state.</p>
<p>There are several reasons why the responder might return an error instead of acknowledging receipt of the initiation request:</p>
<ul>
<li>The initiator is unknown to the receiver (e.g., via presence subscription or stanza session negotiation) and the receiver does not communicate with unknown entities.</li>
<li>The receiver does not support Jingle.</li>
<li>The receiver wishes to redirect the request to another address.</li>
<li>The receiver is busy and therefore cannot participate in a session.</li>
<li>The receiver does not support any of the specified application formats.</li>
<li>The receiver does not support any of the specified transport methods.</li>
<li>The initiator is unknown to the responder (e.g., via presence subscription or stanza session negotiation) and the responder does not communicate with unknown entities.</li>
<li>The responder does not support Jingle.</li>
<li>The responder wishes to redirect the request to another address.</li>
<li>The responder is busy and therefore cannot participate in a session.</li>
<li>The responder does not support any of the specified application formats.</li>
<li>The responder does not support any of the specified transport methods.</li>
<li>The initiation request was malformed.</li>
</ul>
<p>If the initiator is unknown to the receiver (e.g., via presence subscription or stanza session negotiation) and the receiver has a policy of not communicating via Jingle with unknown entities, it SHOULD return a &unavailable; error.</p>
<example caption="Initiator Unknown to Receiver"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the initiator is unknown to the responder (e.g., via presence subscription or stanza session negotiation) and the responder has a policy of not communicating via Jingle with unknown entities, it SHOULD return a &unavailable; error.</p>
<example caption="Initiator is unknown to responder"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>If the receiver does not support Jingle, it MUST return a &unavailable; error.</p>
<example caption="Receiver Does Not Support Jingle"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the responder does not support Jingle, it MUST return a &unavailable; error.</p>
<example caption="Receiver does not support Jingle"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
]]></example>
<p>If the receiver wishes to redirect to another address, it SHOULD return a &redirect; error.</p>
<example caption="Receiver Redirection"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the responder wishes to redirect the request to another address, it SHOULD return a &redirect; error.</p>
<example caption="Receiver redirection"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>xmpp:voicemail@capulet.lit</redirect>
<redirect xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>voicemail@capulet.lit</redirect>
</error>
</iq>
]]></example>
<p>If the receiver is busy, it SHOULD return a &recipient; error along with a Jingle-specific error condition of &lt;busy/&gt;.</p>
<example caption="Receiver Is Busy"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the responder is busy, it SHOULD return a &recipient; error along with a Jingle-specific error condition of &lt;busy/&gt;.</p>
<example caption="Receiver is busy"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='wait'>
<recipient-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<busy xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns-errors'/>
</error>
</iq>
]]></example>
<p>If the receiver does not support any of the specified application formats, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-content/&gt;.</p>
<example caption="Receiver Does Not Support Any Content Description Formats"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the responder does not support any of the specified application formats, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-content/&gt;.</p>
<example caption="Receiver does not support any content description formats"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<unsupported-content xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns-errors'/>
</error>
</iq>
]]></example>
<p>If the receiver does not support any of the specified transport methods, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-transports/&gt;.</p>
<example caption="Receiver Does Not Support Any Transport Methods"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the responder does not support any of the specified transport methods, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-transports/&gt;.</p>
<example caption="Receiver does not support any transport methods"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<unsupported-transports xmlns='http://www.xmpp.org/extensions/xep-0166.html#ns-errors'/>
</error>
</iq>
]]></example>
<p>If the initiation request was malformed, the receiver MUST return a &badrequest; error.</p>
<example caption="Initiation Request Malformed"><![CDATA[
<iq type='error' from='juliet@capulet.lit/balcony' to='romeo@montague.lit/orchard' id='jingle1'>
<p>If the initiation request was malformed, the responder MUST return a &badrequest; error.</p>
<example caption="Initiation request malformed"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
to='romeo@montague.lit/orchard'
type='error'>
<error type='cancel'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
@ -561,10 +596,10 @@ PENDING o---------------------+ |
]]></example>
</section2>
<section2 topic='Decline' anchor='protocol-decline'>
<p>In order to formally decline the session initiation request, the receiver MUST acknowledge receipt of the session initiation request, then terminate the session as described under <link url='#session-terminate'>Termination</link>.</p>
<p>In order to formally decline the session initiation request, the responder MUST acknowledge receipt of the session initiation request, then terminate the session as described under <link url='#session-terminate'>Termination</link>.</p>
</section2>
<section2 topic='Negotiation' anchor='session-negotiation'>
<p>In general, negotiation will be necessary before the parties can agree on an acceptable set of content types, application formats, and transport methods. There are many potential parameter combinations, as defined in the relevant specifications for various application formats and transport methods.</p>
<p>In general, negotiation will be necessary before the parties can agree on an acceptable set of application formats and transport methods. There are many potential parameter combinations, as defined in the relevant specifications for various application formats and transport methods.</p>
<p>The allowable negotiations (including content-level and transport-level negotiations) are as follows:</p>
<ul>
<li>Adding a content type via the content-add action (not allowed in the PENDING state).</li>
@ -574,25 +609,25 @@ PENDING o---------------------+ |
</ul>
</section2>
<section2 topic='Acceptance' anchor='session-acceptance'>
<p>If (after negotiation of transport methods and application formats as well as checking of transport candidates) the receiver determines that it will be able to establish a connection, it sends a definitive acceptance to the initiator.</p>
<p>If (after negotiation of transport methods and application formats as well as checking of transport candidates) the responder determines that it will be able to establish a connection, it sends a definitive acceptance to the initiator.</p>
<p>Note: In the accept stanza, the &JINGLE; element MUST contain one or more &lt;content/&gt; elements, each of which MUST contain one &lt;description/&gt; element and one &lt;transport/&gt; element. The &JINGLE; element SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity, and the initiator SHOULD send all future commmunications about this Jingle session to the JID provided in the 'responder' attribute.</p>
<p>The initiator then acknowledges the receiver's definitive acceptance, after which the parties can exchange media over the negotiated connection.</p>
<p>The initiator then acknowledges the responder's definitive acceptance, after which the parties can exchange media over the negotiated connection.</p>
<p>If one of the parties cannot find a suitable transport method or candidate, it SHOULD terminate the session as described below.</p>
</section2>
<section2 topic='Modifying an Active Session' anchor='session-modify'>
<p>Once a session is in the ACTIVE state, it may be modified via a content-add, content-modify, or content-remove action. Examples of such modifications are shown in the specifications for various application formats and transport methods.</p>
</section2>
<section2 topic='Termination' anchor='session-terminate'>
<p>In order to gracefully end the session (which MAY be done at any point after acknowledging receipt of the initiation request, including immediately thereafter in order to decline the request), either the receiver or the initiator MUST send a "terminate" action to the other party.</p>
<p>In order to gracefully end the session (which MAY be done at any point after acknowledging receipt of the initiation request, including immediately thereafter in order to decline the request), either the responder or the initiator MUST send a "terminate" action to the other party.</p>
<p>The other party MUST then acknowledge termination of the session:</p>
<p>Note: As soon as an entity sends a "session-terminate" action, it MUST consider the session to be ended (even before receiving acknowledgement from the other party). If the terminating entity receives additional IQ-sets from the other party after sending the "session-terminate" action, it MUST reply with an &lt;unknown-session/&gt; error.</p>
<p>Unfortunately, not all sessions end gracefully. In applications of Jingle that also involve the exchange of presence information, receipt of &UNAVAILABLE; from the other party MAY be a considered session-ending event. However, in this case there is nothing for the party to acknowledge.</p>
<p>Note: As soon as an entity sends a "session-terminate" action, it MUST consider the session to be in the ENDED state (even before receiving acknowledgement from the other party). If the terminating entity receives additional Jingle-related IQ-sets from the other party after sending the "session-terminate" action, it MUST reply with an &lt;unknown-session/&gt; error.</p>
<p>Unfortunately, not all sessions end gracefully. In applications of Jingle that also involve the exchange of presence information, receipt of &UNAVAILABLE; from the other party MAY be considered a session-ending event. However, in this case there is nothing for the party to acknowledge.</p>
</section2>
<section2 topic='Informational Messages' anchor='session-info'>
<p>At any point after initiation of a Jingle session, either entity MAY send an informational message to the other party, for example to change a transport method or application format parameter, inform the other party that a device is ringing or that a scheduled event has occurred or will occur, etc.</p>
<p>At any point after initiation of a Jingle session, either entity MAY send an informational message to the other party, for example to change a transport method, inform the other party that a device is ringing or that a scheduled event has occurred or will occur, etc.</p>
<p>An informational message MUST be an IQ-set containing a &JINGLE; element whose 'action' attribute is set to a value of "session-info" or "transport-info"; the &JINGLE; element MUST further contain a payload child element (specific to the session or to a transport method) that specifies the information being communicated. If the party that receives an informational message does not understand the payload, it MUST return a &feature; error with a Jingle-specific error condition of &lt;unsupported-info/&gt;.</p>
<p>If either party receives an empty "session-info" message for an active session, it MUST send an empty IQ result; this way, an empty "session-info" message may be used as a "ping" to determine session vitality.</p>
<p>Informational messages are specific to a particular description format or transport method and therefore are described in specifications other than this one.</p>
<p>Informational messages are specific to a particular application type or transport method and therefore are described in specifications other than this one.</p>
</section2>
</section1>
@ -633,13 +668,13 @@ PENDING o---------------------+ |
</tr>
<tr>
<td>sid</td>
<td>A random session identifier generated by the initiator, which effectively maps to the SIP "Call-ID" parameter; this SHOULD match the XML Nmtoken production <note>See &lt;<link url='http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken'>http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken</link>&gt;</note> so that XML character escaping is not needed for characters such as &amp;.</td>
<td>A random session identifier generated by the initiator, which effectively maps to the SIP "Call-ID" parameter; this SHOULD match the XML Nmtoken production <note>See &lt;<link url='http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken'>http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Nmtoken</link>&gt;</note> so that XML character escaping is not needed for characters such as '&amp;'.</td>
<td>REQUIRED</td>
</tr>
</table>
</section2>
<section2 topic='Content Element' anchor='def-content'>
<p>The attributes of the &CONTENT; element are as follows:</p>
<p>The attributes of the &CONTENT; element are as follows.</p>
<table caption='Attributes of Content Element'>
<tr>
<th>Attribute</th>
@ -663,7 +698,7 @@ PENDING o---------------------+ |
</tr>
<tr>
<td>senders</td>
<td>Which parties in the session will be generating content; the allowable values are "initiator", "recipient", or "both" (where "both" is the default).</td>
<td>Which parties in the session will be generating content; the allowable values are "initiator", "responder", or "both" (where "both" is the default).</td>
<td>RECOMMENDED</td>
</tr>
</table>
@ -671,7 +706,7 @@ PENDING o---------------------+ |
</section1>
<section1 topic='Error Handling' anchor='errors'>
<p>The Jingle-specific error conditions are as follows.</p>
<p>The Jingle-specific error conditions are as follows. These condition elements are qualified by the 'http://www.xmpp.org/extensions/xep-0166.html#ns-errors' namespace &NSNOTE;.</p>
<table caption='Other Error Conditions'>
<tr>
<th>Jingle Condition</th>
@ -686,7 +721,7 @@ PENDING o---------------------+ |
<tr>
<td>&lt;out-of-order/&gt;</td>
<td>&unexpected;</td>
<td>The request cannot occur at this point in the state machine (e.g., initiate after accept).</td>
<td>The request cannot occur at this point in the state machine (e.g., session-initiate after session-accept).</td>
</tr>
<tr>
<td>&lt;unknown-session/&gt;</td>
@ -712,7 +747,7 @@ PENDING o---------------------+ |
</section1>
<section1 topic='Determining Support' anchor='support'>
<p>If an entity supports Jingle, it MUST advertise that fact by returning a feature of "http://www.xmpp.org/extensions/xep-0166.html#ns" &NSNOTE; in response to a &xep0030; information request. The response MUST also include features for the application formats and transport methods supported by the responding entity, as described in the specifications for those formats and methods.</p>
<p>If an entity supports Jingle, it MUST advertise that fact by returning a feature of "http://www.xmpp.org/extensions/xep-0166.html#ns" &NSNOTE; in response to a &xep0030; information request. The response MUST also include features for the application formats and transport methods supported by the responding entity, as described in the relevant specifications.</p>
<example caption="Service Discovery Information Request"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='disco1'
@ -784,7 +819,9 @@ PENDING o---------------------+ |
<application>
<name>the name of the application format</name>
<desc>a natural-language summary of the application format</desc>
<transport>whether the media should be sent over a "reliable" or "lossy" transport</transport>
<transport>
whether the media can be sent over a "reliable" transport, a "lossy" transport, or "both"
</transport>
<doc>the document in which this application format is specified</doc>
</application>
]]></code>
@ -796,7 +833,7 @@ PENDING o---------------------+ |
<transport>
<name>the name of the transport method</name>
<desc>a natural-language summary of the transport method</desc>
<type>whether the transport method is "reliable" or "lossy"</type>
<type>whether the transport method can be "reliable", "lossy", or "both"</type>
<doc>the document in which this transport method is specified</doc>
</transport>
]]></code>
@ -884,11 +921,9 @@ PENDING o---------------------+ |
<xs:element name='content'>
<xs:complexType>
<xs:choice minOccurs='0'>
<xs:sequence>
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
</xs:choice>
<xs:sequence>
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute name='creator' use='required'>
<xs:simpleType>
<xs:restriction base='xs:NCName'>
@ -949,7 +984,7 @@ PENDING o---------------------+ |
<li>Define a full-featured protocol for XMPP signalling.</li>
</ol>
<p>Implementation experience indicates that a dual-stack approach may not be feasible on all the computing platforms for which Jabber clients have been written, or even desirable on platforms where it is feasible. <note>For example, one large ISP decided to switch to a pure XMPP approach after having implemented and deployed a dual-stack client for several years.</note> Therefore, it seemed reasonable to define an XMPP signalling protocol that could provide the necessary session management semantics while also making it relatively straightforward to interoperate with existing Internet standards.</p>
<p>As a result of feedback received on <cite>XEP-0111</cite>, the original authors of this document (Joe Hildebrand and Peter Saint-Andre) began to define such a signalling protocol, code-named Jingle. Upon communication with members of the Google Talk team, <note>Google Talk is a messaging and voice chat service and client provided by Google; see &lt;<link url='http://www.google.com/talk/'>http://www.google.com/talk/</link>&gt;.</note> it was discovered that the emerging Jingle approach was conceptually (and even syntactically) quite similar to the signalling protocol used in the Google Talk application. Therefore, in the interest of interoperability and adoption, we decided to harmonize the two approaches. The signalling protocol specified herein is, therefore, substantially equivalent to the original Google Talk protocol, with several adjustments based on feedback received from implementors as well as for publication within the XMPP Standards Foundation's standards process.</p>
<p>As a result of feedback received on <cite>XEP-0111</cite>, the original authors of this document (Joe Hildebrand and Peter Saint-Andre) began to define such a signalling protocol, code-named Jingle. Upon communication with members of the Google Talk team, <note>Google Talk is a messaging and voice chat service and client provided by Google; see &lt;<link url='http://www.google.com/talk/'>http://www.google.com/talk/</link>&gt;.</note> it was discovered that the emerging Jingle approach was conceptually (and even syntactically) quite similar to the signalling protocol used in the Google Talk application. Therefore, in the interest of interoperability and adoption, we decided to harmonize the two approaches. The signalling protocol specified herein is, therefore, substantially equivalent to the original Google Talk protocol, with several adjustments based on feedback received from implementors as well as for publication by the XMPP Standards Foundation.</p>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>The authors would like to thank Rohan Mahy for his valuable input on early versions of this document. Thiago Camargo, Dafydd Harries, Antti Ij&#228;s, Lauri Kaila, Justin Karneges, Jussi Laako, Anthony Minessale, Matt O'Gorman, Rob Taylor, Matt Tucker, Saku Vainio, Brian West, and others have also provided helpful input. Thanks also to those who have commented on the &SSIG; and (earlier) Jingle <note>Before this specification was formally accepted by the XMPP Standards Foundation as an XMPP Extension Protocol, it was discussed on the semi-private &lt;jingle@jabber.org&gt; mailing list; although that list is no longer used since the standards@xmpp.org list is the preferred discussion venue, for historical purposes it is publicly archived at &lt;<link url='http://mail.jabber.org/pipermail/jingle/'>http://mail.jabber.org/pipermail/jingle/</link>&gt;.</note> mailing lists.</p>