mirror of
https://github.com/moparisthebest/xeps
synced 2025-02-16 07:10:15 -05:00
0.5
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1384 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
c0bc32a180
commit
031794d286
54
xep-0168.xml
54
xep-0168.xml
@ -24,6 +24,12 @@
|
||||
<shortname>TO BE ASSIGNED</shortname>
|
||||
&stpeter;
|
||||
&hildjj;
|
||||
<revision>
|
||||
<version>0.5</version>
|
||||
<date>2007-11-15</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Editorial review and consistency check.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.4</version>
|
||||
<date>2007-06-06</date>
|
||||
@ -86,8 +92,8 @@
|
||||
</revision>
|
||||
</header>
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>Within the Extensible Messaging and Presence Protocol (XMPP; see &rfc3920;), presence indicates availability for communication -- specifically, communication via XMPP messaging in the "jabber:client" namespace (usually in the form of "instant messaging" or IM as described in &rfc3921;). However, a wide variety of entities might provide XMPP presence, including entities that are not primarily focused on IM (e.g., phones) or even entities that do not support XMPP messaging at all.</p>
|
||||
<p>Consider a scenario in which a contact wants to initiate a voice chat (e.g., via &xep0166;) with a user who has the following three XMPP resources:</p>
|
||||
<p>Within the Extensible Messaging and Presence Protocol (XMPP; see &rfc3920;), presence indicates availability for communication. Specifically, in systems that bundle presence and instant messaging (see &rfc3921;), the <priority/> child of the XMPP &PRESENCE; stanza indicates availability for communications qualified by the "jabber:client" namespace. However, a wide variety of entities might provide XMPP presence, including entities that are not primarily focused on IM (e.g., phones) or even entities that do not support XMPP messaging at all.</p>
|
||||
<p>Consider a scenario in which a contact wants to initiate a voice chat (see &xep0167;) with a user who has the following three XMPP resources:</p>
|
||||
<table caption='Application Presence'>
|
||||
<tr>
|
||||
<th>Resource</th>
|
||||
@ -110,12 +116,36 @@
|
||||
<td>10</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>If the contact chooses the resource with which it initiates a voice chat based on the user's default XMPP presence priority (i.e., priority for XMPP messaging), the resulting behavior could be misleading (i.e., initiating the voice chat with the "desktop" resource rather than the "mobile" resource).</p>
|
||||
<p>What is needed is a way for the user's clients to indicate that the application priority for the three resources is different from the standard XMPP messaging priority. Such information can also be used by an XMPP server to route XMPP &MESSAGE; stanzas directed to a user's bare JID (&BAREJID;). This document defines such a mechanism via an optional XMPP presence extension.</p>
|
||||
<p>In addition, this document also defines a way for an XMPP server to flag which resource it considers to be primary for any given application type, if it has information -- such as communication preferences -- that can help determine the primary resource.</p>
|
||||
<p>If the contact chooses the resource with which it initiates a voice chat based on the standard XMPP <priority/> element, the resulting behavior could be misleading (i.e., initiating the voice chat with the "desktop" resource rather than the "mobile" resource).</p>
|
||||
<p>What is needed is a way for the user's clients to indicate that the application priority for the three resources is different from the standard XMPP priority. Such information can also be used by an XMPP server to route XMPP &MESSAGE; stanzas directed to a user's bare JID (&BAREJID;). This document defines such a mechanism via an optional XMPP presence extension.</p>
|
||||
<p>In addition, this document also defines a way for an XMPP server to flag which resource it considers to be primary for any given application type, if it has information -- such as communication preferences -- that can help it determine the primary resource.</p>
|
||||
</section1>
|
||||
<section1 topic='Application Priority' anchor='primary'>
|
||||
<p>Consider the three resources ("desktop", "pda", and "mobile") mentioned above. The presence stanzas received by a contact for those three resources would be as follows &NSNOTE;:</p>
|
||||
<p>Application priority is encapsulated by a <rap/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns' namespace &NSNOTE;. The attributes of the <rap/> element are as follows.</p>
|
||||
<table caption='RAP Attributes'>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Definition</th>
|
||||
<th>Inclusion</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ns</td>
|
||||
<td>The primary namespace of the application type.</td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>num</td>
|
||||
<td>The resource's priority for this application type. <note>This protocol uses a 'num' attribute rather than a 'priority' attribute to reduce confusion with standard XMPP presence.)</note></td>
|
||||
<td>REQUIRED</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>The following business rules apply to resource application presence provided by the client:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A client SHOULD include a <rap/> element for each application type for which it wishes to advertise a priority, but SHOULD NOT do so if the priority for that application is the same as the resource's standard XMPP priority.</p></li>
|
||||
<li><p>A client MUST NOT generate a <rap/> element that has a 'ns' attribute whose value is "jabber:client" or that has no 'ns' attribute (since the default 'ns' is "jabber:client").</p></li>
|
||||
<li><p>The <rap/> element SHOULD be empty.</p></li>
|
||||
</ol>
|
||||
<p>Consider the three resources ("desktop", "pda", and "mobile") mentioned above. The presence stanzas received by a contact for those three resources would be as follows.</p>
|
||||
<example caption='Contact receives presence from user'><![CDATA[
|
||||
<presence from='juliet@capulet.com/desktop' to='romeo@montague.net/home'>
|
||||
<priority>10</priority>
|
||||
@ -138,12 +168,6 @@
|
||||
num='10'/>
|
||||
</presence>
|
||||
]]></example>
|
||||
<p>(Note: This protocol uses a 'num' attribute rather than a 'priority' attribute to reduce confusion with XMPP presence.)</p>
|
||||
<p>The following business rules apply to resource application presence provided by the client:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A client SHOULD NOT specify resource application presence if the priority for that application is the same as the resource's XMPP messaging priority.</p></li>
|
||||
<li><p>A client MUST NOT generate a <rap/> element that has a 'ns' attribute whose value is "jabber:client" or that has no 'ns' attribute (since the default 'ns' is "jabber:client").</p></li>
|
||||
</ol>
|
||||
</section1>
|
||||
<section1 topic='Flagging the Primary Resource' anchor='flag'>
|
||||
<p>The user's server may have special information that enables it to flag a resource as primary for a given application type. For instance, the server may include a communication policy service that enables the user to define (outside the context of any presence priorities) that she would prefer to be called at her desktop computer only between the hours of 9:00 AM and 5:00 PM local time, prefer to be called on her mobile phone at all other times, and so on.</p>
|
||||
@ -161,7 +185,7 @@
|
||||
<p>The following business rules apply to resource flagging by the server:</p>
|
||||
<ol start='1'>
|
||||
<li><p>A server MAY add the primary resource flag to the presence broadcasts generated by the resource it determines is "most available" for a given application type.</p></li>
|
||||
<li><p>Because the default 'ns' is "jabber:client", to flag the primary resource for XMPP messaging the server SHOULD NOT include a 'ns' attribute, SHOULD NOT include a 'num' attribute, and MUST include a <primary/> child.</p></li>
|
||||
<li><p>Because the default 'ns' is "jabber:client", to flag the primary resource for standard XMPP communications the server SHOULD NOT include a 'ns' attribute, SHOULD NOT include a 'num' attribute, and MUST include a <primary/> child.</p></li>
|
||||
<li><p>An available resource that has specified a negative priority for an application type MUST NOT be flagged as the primary resource for that application type.</p></li>
|
||||
<li><p>A client SHOULD NOT include the primary resource flag in presence stanzas that it generates; however, if a client includes the primary resource flag in a presence stanza, the server SHOULD remove or overwrite the flag.</p></li>
|
||||
<li><p>In response to a presence probe, a server SHOULD send presence from the primary resource first (this enables the receiving client to skip any local most-available algorithms it might implement).</p></li>
|
||||
@ -170,7 +194,7 @@
|
||||
</section1>
|
||||
<section1 topic='RAP-Based Message Routing' anchor='route'>
|
||||
<p>A server MAY use the RAP data provided by clients in order to route incoming &MESSAGE; stanzas directed to the bare JID (&BAREJID;) of a registered account. In order to enable such routing, the sender MUST include an empty <route/> element qualified by the 'http://www.xmpp.org/extensions/xep-0168.html#ns-raproute' namespace &NSNOTE; including an 'ns' attribute corresponding to the desired application.</p>
|
||||
<p>For example, consider a &xep0155; request sent from one user (Romeo) to another (Juliet), where the users do not share presence:</p>
|
||||
<p>For example, consider a &xep0155; request sent from one user (Romeo) to another (Juliet), where the users do not share presence. Romeo wants the request to be delivered to the highest-priority resource for the "http://www.xmpp.org/extensions/xep-0167#ns" application type.</p>
|
||||
<example caption="User requests session"><![CDATA[
|
||||
<message type='headline'
|
||||
from='romeo@montague.net/orchard'
|
||||
@ -195,7 +219,7 @@
|
||||
<p>If Juliet's server supports RAP routing, it would then deliver the message to whichever of Juliet's resources has the highest priority for the "http://www.xmpp.org/extensions/xep-0167#ns" application type.</p>
|
||||
</section1>
|
||||
<section1 topic='Determining Support' anchor='disco'>
|
||||
<p>In order to discover whether a server or other entity supports this protocol, an entity MUST use &xep0030;.</p>
|
||||
<p>In order to discover whether a server or other entity supports this protocol, an entity MUST use &xep0030; or the dynamic profile of service discovery defined in &xep0115;.</p>
|
||||
<example caption='Entity queries a server regarding protocol support'><![CDATA[
|
||||
<iq type='get'
|
||||
from='juliet@capulet.com/balcony'
|
||||
|
Loading…
Reference in New Issue
Block a user