XEP-0318: Best Practices for Client Initiated Presence Probes

This specification defines a way to determine the time when a XMPP entity has last changed its presence. Using client initiated presence probes the current presence of subscribed XMPP users can be requested. In addition a protocol to request the uptime of servers and components is defined herein.
Tobias Markmann
© 2013 – 2013 XMPP Standards Foundation. SEE LEGAL NOTICES.


WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
0.2 (2013-08-06)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Active

1. Introduction

RFC 6121 [1], section 4.3, defines presence probes as a way for servers to actively ping for presence status of XMPP contacts. In some scenarios however, clients want to request an update on the status of a XMPP contact.

2. Rationale

While RFC 6121 [1] specifically advises against (SHOULD NOT) clients sending presence probes to XMPP contacts, there are valid scenarios where XMPP clients want to send presence probes.

According to RFC 6121 [1], contacts a client doesn't have presence information on, are expected to be offline and server aren't mandated to explicitly send offline presence to the client for offline users.

In addition, clients in constrained environments (i.e. mobile clients), could explicitly tell the server to filter out presence stanzas of certain kind, to keep communication to a minimum. One such protocol is Stanza Interception and Filtering Technology (XEP-0273) [2].

This causes presence information to be outdated and any information, that might have been attached to the offline presence, i.e. Delayed Delivery (XEP-0203) [3], to be missing at client side.

Sending presence probes from the client should be based on human request, i.e. opening a chat dialog to an offline contact when messing full presence information for that contact. Clients MUST NOT send presence probes to all contacts that they think are offline after login.

3. Use Cases

This section describes two major use cases of the described protocol, client initiated presence probes.

3.1 Requesting up-to-date Presence of a XMPP Entity

In some situations, after login, the client has incomplete presence information for offline contacts. The user might be interested in status text of the offline presence of a contact or when a contact went offline. This information can be requested, i.e. when the user opens a chat dialog to an offline user, using a client initiated presence probe and is described in the following two examples.

Initialilly a client requests the current presence information of a contact by sending out a presence probe.

Example 1. Request for up-to-date Presence using Presence Probe
<presence from='juliet@capulet.com/balcony' to='romeo@montague.com' type='probe' />

The other side's server, in this example montague.com, then responds with the last known presence of the user, including Delayed Delivery (XEP-0203) [3] and other information provided by the user.

Example 2. Presence Reply in Response to Presence Probe
<presence from='romeo@montague.com' to='juliet@capulet.com/balcony' type='unavailable'>
  <status>Going offline. Out of battery.</status>
  <delay xmlns='urn:xmpp:delay'

3.2 Requesting Uptime of a XMPP Server

XMPP servers typically don't have all the properties known from XMPP clients, like presence or rosters. However, Server Buddies (XEP-0267) [4] for example added rosters to XMPP servers.

In a similar manner, this extension describes the use of presence for XMPP servers and XMPP components. Basically, when a XMPP server or component starts up it's expected to set its presence to online.

With this concept, any party could easily request the time a XMPP server or component went online, by sending a presence probe to it.

Example 3. Request for Presence of a XMPP Server
<presence from='juliet@capulet.com/balcony' to='montague.com' type='probe' />

In response, the requester receives a presence stanza, which contains Delayed Delivery (XEP-0203) [3] information, indicating the time the server went online.

Example 4. Response from XMPP Server indicating uptime
<presence from='montague.com' to='juliet@capulet.com/balcony'>
  <delay xmlns='urn:xmpp:delay'

4. Acknowledgements

Thanks to Kim Alvefur and Lance Stout for their helpful comments.

5. Security Considerations

Adding delayed delivery notation to the presence probe responses exposes information a user might not expect to have exposed. However, the information about last presence change is known to all entities subscribed to one's presence which are online. This extension just provides this information to XMPP entities which have been offline during the course of presence change.

The security considerations of XMPP Date and Time Profiles (XEP-0082) [5] apply here.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [6].

7. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [7].


Appendix A: Document Information

XMPP Standards Foundation
Last Updated
Approving Body
XMPP Council
XMPP Core, XMPP IM, XEP-0203
Superseded By
Short Name
Source Control

This document in other formats: XML  PDF

Appendix B: Author Information

Tobias Markmann


This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).


Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.

2. XEP-0273: Stanza Interception and Filtering Technology <https://xmpp.org/extensions/xep-0273.html>.

3. XEP-0203: Delayed Delivery <https://xmpp.org/extensions/xep-0203.html>.

4. XEP-0267: Server Buddies <https://xmpp.org/extensions/xep-0267.html>.

5. XEP-0082: XMPP Date and Time Profiles <https://xmpp.org/extensions/xep-0082.html>.

6. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.

7. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.2 (2013-08-06)

    Fix issues raised in XMPP Council meeting.

  2. Version 0.1 (2013-03-04)

    Initial published version approved by the XMPP Council.

  3. Version 0.0.1 (2013-02-20)

    Initial version.


Appendix I: Bib(La)TeX Entry

  title = {Best Practices for Client Initiated Presence Probes},
  author = {Markmann, Tobias},
  type = {XEP},
  number = {0318},
  version = {0.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0318.html},
  date = {2013-02-20/2013-08-06},