XEP-0130: Waiting Lists

Abstract
This document defines an XMPP protocol extension that enables a user to add a non-IM user to a waiting list and be informed when the contact creates an IM account.
Authors
  • Peter Saint-Andre
  • Yehezkel Dallal
  • Alexandre Nolle
  • Jean-Louis Seguineau
  • Mark Troyer
  • Valerie Mercier
Copyright
© 2003 – 2021 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deprecated

WARNING: This document has been Deprecated by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended. Developers desiring similar functionality are advised to implement the protocol that supersedes this one (if any).
Type
Historical
Version
1.4.1 (2021-03-04)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Active
  4. Deprecated
  5. Obsolete

1. Introduction

An IM user may want to be informed when a contact creates an IM account. If the user knows some information about the contact (e.g., a phone number or email address), the user's service can use that information to place the contact on a "waiting list", then inform the user when the contact creates an IM account. This document defines an extension to XMPP Core [1] and XMPP IM [2] that enables such "waiting list" functionality, including the ability to add contacts on other domains if service providers agree to interoperate (e.g., to add a contact who uses a different mobile telephony service provider).

Note: The protocol defined herein is currently in use at several large service providers in Europe. Others are welcome to use the protocol.

2. Glossary

Contact
A person with whom an IM User seeks to communicate, identified by a URI such as <tel:PhoneNumber> (see RFC 3966 [3]) or <mailto:EmailAddress> (see RFC 2368 [4]).
Customer
A person who is contracted for services with a ServiceProvider.
IM User
Any Customer who has registered for instant messaging services.
InteropPartner
Any company that agrees to interoperate using the protocol defined herein.
JID
The unique identifier of an IM User in the XMPP protocol. Outside the context of an IM session, a JID is of the form (<localpart@domain.tld> or <domain.tld>) ("bare JID"); within the context of an IM session, a JID is of the form (<localpart@domain.tld/resource> or <domain.tld/resource>) ("full JID").
ServiceProvider
A company that provides telephony or email services to a Customer.
URI
A Uniform Resource Identifier as defined in RFC 3986 [5]. Specific URI schemes that may be useful in this specification include 'tel:', 'mailto:', and 'sip:', but any URI scheme may be used.
Waiting List
A list of Contacts whom an entity (IM User or InteropPartner) is waiting to hear about regarding their status as instant messaging users.
WaitingListService
An XMPP service that maintains Waiting lists for IM Users and/or InteropPartners.

3. Requirements

This protocol is designed so that an IM User can:

  1. Request the user's current Waiting List
  2. Add a Contact to a local WaitingList (based on some URI associated with the Contact)
  3. Receive notification from a local WaitingListService if the Contact has (or subsequently creates) an IM account
  4. Remove a Contact from the Waiting List

In addition, this protocol is designed so that a ServiceProvider can:

  1. Request the service's current WaitingList
  2. Add a Contact to a WaitingList at an InteroPartner (based on some URI associated with the Contact)
  3. Receive notification from the InteropPartner if the Contact has (or subsequently creates) an IM account
  4. Remove a Contact from the Waiting List

4. Use Cases

4.1 IM User Retrieves Current WaitingList

Before adding or removing Contacts from its WaitingList, an IM User SHOULD retrieve its current WaitingList. The activity flow is as follows:

4.1.1 Primary Flow

  1. IM User discovers WaitingListService hosted by ServiceProvider [A1]; it is RECOMMENDED to do this immediately after logging in.
  2. IM User requests current WaitingList from WaitingListService.
  3. WaitingListService returns WaitingList to IM User, including any items for which JIDs have been discovered. [A2]

4.1.2 Alternate Flows

  1. ServiceProvider does not host a WaitingListService:
    1. Use Case Ends unsuccessfully.
  2. IM User does not have a Waiting List:
    1. WaitingListService returns <item-not-found/> error to IM User.
    2. Use Case Ends unsuccessfully.

4.2 IM User Adds Contact to WaitingList

An IM User may know a URI for a Contact (e.g., a phone number or email address) but not the Contact's JID. In order to subscribe to the Contact's presence or otherwise communicate with the Contact over an instant messaging system, the IM User first needs to discover the Contact's JID based on a URI for the Contact. However, the Contact may not yet have an IM account. Because the IM User may therefore need to wait until the Contact creates an account, the IM User needs to add the Contact to a WaitingList. The activity flow is as follows:

4.2.1 Primary Flow

  1. IM User completes IM User Retrieves Current WaitingList use case.
  2. IM User requests addition of Contact to WaitingList based on Contact's URI.
  3. WaitingListService determines that the URI scheme is supported. [A1]
  4. WaitingListService determines that the information provided is a valid URI for that URI scheme. [A2]
  5. WaitingListService determines that Contact's URI does not belong to a person served by ServiceProvider. [A3]
  6. WaitingListService acknowledges addition of Contact to IM User's WaitingList.
  7. WaitingListService discovers WaitingListServices hosted by one or more InteropPartners.
  8. WaitingListService queries one or more InteropPartner's WaitingListServices for JID associated with URI.
  9. InteropPartner's WaitingListService determines that Contact's URI belongs to a person served by that partner. [A4]
  10. InteropPartner's WaitingListService determines that Contact is an IM User. [A5]
  11. InteropPartner's WaitingListService informs ServiceProvider's WaitingListService of JID associated with Contact's URI. [A6] [A10]
  12. ServiceProvider's WaitingListService informs IM User of Contact's JID. [A8]
  13. IM User completes IM User Removes Contact from WaitingList use case.
  14. Use Case Ends.

4.2.2 Alternate Flows

  1. The URI scheme is not supported:
    1. WaitingListService sends <bad-request/> error to IM User and does not add contact to WaitingList.
    2. Use Case Ends unsuccessfully.
  2. The information provided is not a valid URI:
    1. WaitingListService sends <not-acceptable/> error to IM User and does not add contact to WaitingList.
    2. Use Case Ends unsuccessfully.
  3. URI belongs to person served by ServiceProvider:
    1. WaitingListService determines that Contact is an IM User registered with ServiceProvider [A7].
    2. WaitingListService informs IM User of Contact's JID. [A9]
    3. IM User completes IM User Removes Contact from WaitingList use case.
    4. Use Case Ends.
  4. URI does not belong to a person served by InteropPartner:
    1. InteropPartner sends <item-not-found/> error to WaitingListService.
    2. If all InteropPartners queried return <item-not-found/> error, WaitingListService sends <item-not-found/> error (or local equivalent) to IM User.
    3. IM User completes IM User Removes Contact from WaitingList use case.
    4. Use Case Ends unsuccessfully.
  5. Contact is not an IM User registered with InteropPartner:
    1. InteropPartner records and acknowledges WaitingListService's request for JID associated with URI.
    2. OPTIONALLY, InteropPartner invites Contact to register as an IM User.
    3. Contact registers.
    4. InteropPartner informs Service Provider's WaitingListService of JID associated with Contact's URI.
    5. ServiceProvider's WaitingListService informs all IM Users who requested JID associated with Contact's URI.
    6. IM User completes IM User Removes Contact from WaitingList use case.
    7. Use Case Ends.
  6. InteropPartner refuses to provide service to ServiceProvider:
    1. InteropPartner's WaitingListService sends <not-authorized/> error to ServiceProvider's WaitingListService.
    2. If all other InteropPartners also return errors, WaitingListService returns <item-not-found/> error to IM User.
    3. Use Case Ends unsuccessfully.
  7. Contact is not an IM User registered with ServiceProvider:
    1. WaitingListService records IM User's request for JID associated with URI.
    2. OPTIONALLY, WaitingListService invites Contact to register as an IM User.
    3. Contact registers.
    4. WaitingListService informs all IM Users who requested JID associated with Contact's URI.
    5. IM User completes IM User Removes Contact from WaitingList use case.
    6. Use Case Ends.
  8. Contact's URI is not handled by any ServiceProvider:
    1. WaitingListService informs all IM Users who requested JID associated with Contact's URI that no InteropPartner services Contact's URI.
    2. IM User completes IM User Removes Contact from WaitingList use case.
    3. Use Case Ends unsuccessfully.
  9. IM User completes IM User Removes Contact from WaitingList use case.
    1. ServiceProvider's WaitingListService removes item from WaitingList.
    2. Use Case Ends unsuccessfully.
  10. All Users Remove Contact from Their WaitingLists
    1. ServiceProvider's WaitingListService removes item from WaitingList at InteropPartner's WaitingListService.
    2. Use Case Ends unsuccessfully.

4.3 IM User Removes Contact from WaitingList

An IM User should remove a contact from the WaitingList after the IM User Adds Contact to WaitingList use case ends (either successfully or unsuccessfully), and may remove a contact from the WaitingList at any other time.

4.3.1 Primary Flow

  1. IM User sends removal request to WaitingListService.
  2. WaitingListService removes IM User's request for JID associated with URI.
  3. WaitingListService informs IM User of successful removal [A1].
  4. WaitingListService sends removal request to appropriate InteropPartner's WaitingListService [A2].
  5. InteropPartner's WaitingListService determines that URI belongs to a person served by that partner.
  6. InteropPartner's WaitingListService removes ServiceProvider's WaitingListService's request for JID.
  7. InteropPartner's WaitingListService informs ServiceProvider's WaitingListService of successful removal.
  8. Use Case Ends.

4.3.2 Alternate Flows

  1. IM User never requested JID associated with URI:
    1. WaitingListService sends <item-not-found/> error to IM User.
    2. Use Case Ends.
  2. Contact URI is served by WaitingListService or IM User was not the only person who requested the JID:
    1. Use Case Ends.

5. Protocol

5.1 IM User Interaction With WaitingListService

This section of the document is provided for the sake of domains that implement XMPP as their local protocol; domains that implement another protocol will use their service-specific protocol to complete the user-to-domain interaction.

5.1.1 IM User Retrieves Current WaitingList

It is RECOMMENDED for an IM User's client to retrieve the WaitingList immediately after logging in. However, first it must discover its local WaitingListService. An IM User MAY use either Service Discovery (XEP-0030) [6] or the deprecated Agent Information (XEP-0094) [7] protocol.

Example 1. IM User Discovers WaitingListService by Sending Agent Information Request to its Server
<iq type='get' id='agent1'>
  <query xmlns='jabber:iq:agents'/>
</iq>
Example 2. Server Returns Address of its WaitingListService
<iq type='result' id='agent1'>
  <query xmlns='jabber:iq:agents'>
    ...
    <agent jid='waitlist.service-provider.com'>
      <name>Waiting List Service</name>
      <service>waitinglist</service>
    </agent>
    ...
  </query>
</iq>
Example 3. IM User Discovers WaitingListService by Sending Service Discovery Request to its Server
<iq type='get' id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
Example 4. Server Returns Address of its WaitingListService
<iq type='result' id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    ...
    <item jid='waitlist.service-provider.com'
          name='Waiting List Service'/>
    ...
  </query>
</iq>
Example 5. IM User Queries WaitingListService for Detailed Information
<iq type='get'
    from='user@service-provider.com/resource'
    to='waitlist.service-provider.com'
    id='disco2'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

The WaitingListService SHOULD return detailed information about the service it provides, including the URI schemes it supports (see also the Service Discovery Features section of this document).

Example 6. WaitingListService Returns Detailed Information
<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='disco2'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity category='directory' type='waitinglist'/>
    <feature var='http://jabber.org/protocol/waitinglist'/>
    <feature var='http://jabber.org/protocol/waitinglist/schemes/mailto'/>
    <feature var='http://jabber.org/protocol/waitinglist/schemes/tel'/>
  </query>
</iq>

Once an IM User has discovered the WaitingListService, the user's client SHOULD request its current Waiting List. This is done by sending an IQ-get to the WaitingListService containing an empty <query/> element qualified by the 'http://jabber.org/protocol/waitinglist' namespace:

Example 7. IM User Requests its Current WaitingList
<iq type='get'
    from='user@service-provider.com/resource'
    to='waitlist.service-provider.com'
    id='request1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'/>
</iq>

Upon request, the WaitingListService MUST return the current WaitingList to the IM User:

Example 8. WaitingListService Returns WaitingList to IM User
<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='request1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='12345'>
      <uri scheme='tel'>3033083282</uri>
      <name>PSA</name>
    </item>
    <item id='23456'>
      <uri scheme='mailto'>editor@xmpp.org</uri>
      <name>XMPP Extensions Editor</name>
    </item>
  </query>
</iq>

Each ItemID MUST be unique within the scope of the client's WaitingList items. The value of the ItemID is an opaque string; an implementation MAY assign semantic meaning to the ItemID (e.g., id="John Smith (mobile)" rather than id="12345"), but such meaning is implementation-specific and outside the scope of the protocol defined herein. The user MAY include a <name/> element containing a natural-language name for the Contact.

The WaitingList MAY contain an item for which a JID has been discovered.

Example 9. IM User Asks for its WaitingList including Newly Discovered JID
<iq type='get'
    from='user@service-provider.com/resource'
    to='waitlist.service-provider.com'
    id='jidask1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'/>
</iq>

<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='jidask1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='12345' jid='stpeter@jabber.org'>
      <uri scheme='tel'>3033083282</uri>
      <name>PSA</name>
    </item>
    <item id='23456'>
      <uri scheme='mailto'>editor@xmpp.org</uri>
      <name>XMPP Extensions Editor</name>
    </item>
  </query>
</iq>

5.1.2 IM User Adds Contact to WaitingList

Once an IM User's client has discovered the WaitingListService and requested the user's WaitingList, the user can add Contacts to the WaitingList based on the Contact's URI. (Note: This document uses the example of phone numbers via the 'tel' URI scheme, but the same rules apply to WaitingList items based on email addresses or other URI schemes.)

Example 10. IM User Requests Addition of Contact to WaitingList
<iq type='set'
    to='waitlist.service-provider.com'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
    </item>
  </query>
</iq>

As described below, various error conditions may occur. (For information about error syntax, refer to RFC 6120 and Error Condition Mappings (XEP-0086) [8].)

If the IM User provided a URI whose scheme is not supported, WaitingListService MUST return a <bad-request/> error to the IM User and MUST NOT add the Contact to the WaitingList.

Example 11. WaitingListService Returns <bad-request/> Error to IM User
<iq type='error'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tag'>shakespeare.lit,2005-08:waitlist1</uri>
      <name>contact-name</name>
    </item>
  </query>
  <error code='400' type='modify'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If the IM User included a JID in the request, WaitingListService MUST return a <bad-request/> error to IM User and MUST NOT add the Contact to the WaitingList. (Note: A WaitingListService MUST NOT return a non-XMPP URI to an IM User based on the Contact's JID; see the Security Considerations section of this document.)

Example 12. WaitingListService Returns <bad-request/> Error to IM User
<iq type='error'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item jid='some-jid'>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
    </item>
  </query>
  <error code='400' type='modify'>
    <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If the IM User provided an invalid URI (e.g., a phone number with too many digits or an email address with no '@' character), WaitingListService MUST return a <not-acceptable/> error to the IM User and MUST NOT add the Contact to the WaitingList.

Example 13. WaitingListService Returns <not-acceptable/> Error to IM User
<iq type='error'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>+1234563033083283</uri>
      <name>contact-name</name>
    </item>
  </query>
  <error code='406' type='modify'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If one of the foregoing errors was generated (all of which have a type of "modify"), IM User SHOULD modify the request and re-submit it.

If none of the "modify" errors was generated, WaitingListService MUST inform the IM User that the request was successfully received, including a unique ID number for the new WaitingList item.

Example 14. WaitingListService Informs IM User that Request was Received
<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'/>
  </query>
</iq>

If none of the "modify" errors was generated and WaitingListService knows Contact JID when the IQ result is returned to the user (e.g., because Contact is served by ServiceProvider), WaitingListService MAY include the WaitingList item in the IQ result: [9]

Example 15. WaitingListService Returns IQ Result to IM User (With Contact JID)
<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567' jid='contact@service-provider.com'>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
    </item>
  </query>
</iq>

If none of the "modify" errors was generated and WaitingListService does not know Contact JID when the IQ result is returned to the user, it needs to contact InteropPartners in order to determine if the Contact is associated with one of the InteropPartners. Thus before it returns the Contact JID to the IM User, it needs to wait for the one of the InteropPartners to return Contact JID or for all of the InteropPartners to return errors.

If all of the InteropPartners return an error of type "cancel" (typically <item-not-found/> and/or <not-authorized/>) to WaitingListService, WaitingListService MUST return an <item-not-found/> error (or local equivalent) to the IM User (and IM User SHOULD complete IM User Removes Contact from WaitingList use case).

Example 16. WaitingListService Returns <item-not-found/> Error to IM User
<message
    type='error'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <waitlist xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>+1234563033083283</uri>
      <name>contact-name</name>
    </item>
  </waitlist>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</message>

If the connection to at least one of the InteropPartners times out (a <remote-server-timeout/> error), WaitingListService MUST return an IQ-result as described above (indicating that the request was received) and resend the request to the InteropPartners that timed out. If connections continue to time out (over some configurable time period and for some configurable number of retries), WaitingListService SHOULD then return a <remote-server-timeout/> error to IM User via a "JID push" message as shown below.

If InterPartner's WaitingListService knows the Contact JID, it sends it to ServiceProvider's WaitingListService as shown in the ServiceProvider's WaitingListService Adds Contact to WaitingList section of this document.

If WaitingListService knows Contact JID (or learns Contact JID from InteropPartner), it MUST inform IM User through a "JID push" message, which consists of a message stanza that contains a <waitlist/> element qualified by the 'http://jabber.org/protocol/waitinglist' namespace: [10]

Example 17. WaitingListService Pushes Contact's JID to IM User
<message
    from='waitlist.service-provider.com'
    to='user@service-provider.com'>
  <body>This message contains a WaitingList item.</body>
  <waitlist xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567' jid='contact@service-provider.com'>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
    </item>
  </waitlist>
</message>

Note: The JID push uses an XMPP <message/> stanza because the WaitingListService has no knowledge of the user's presence and therefore cannot assume that an <iq/> stanza will be received by the user at a specific resource.

If WaitingListService learns that Contact's URI is not handled by any InteropPartner, it MUST inform IM User through a "JID push" message:

Example 18. WaitingListService Informs IM User that No InteropPartner Handles Contact's URI
<message
    from='waitlist.service-provider.com'
    to='user@service-provider.com'>
  <body>Sorry, we cannot find this contact.</body>
  <waitlist xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'
          jid='contact@service-provider.com'
          type='error'>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
      <error code='404'
             type='cancel'
             xmlns='jabber:client'>
        <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
      </error>
    </item>
  </waitlist>
</message>

After receiving the "JID push" message, IM User SHOULD complete the IM User Removes Contact from WaitingList use case.

5.1.3 IM User Removes Contact from WaitingList

In order to remove the item from the WaitingList, the IM User MUST complete the Remove Contact from WaitingList use case.

Example 19. IM User Sends Removal Request to WaitingListService
<iq type='set'
    from='user@service-provider.com/resource'
    to='waitlist.service-provider.com'
    id='remove1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'>
      <remove/>
    </item>
  </query>
</iq>

If WaitingListService previously recorded request, WaitingListService removes request from list and returns result to IM User.

Example 20. WaitingListService Returns Result to IM User
<iq type='result'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='remove1'/>

If WaitingListService did not previously record this request, WaitingListService MUST return an <item-not-found/> error to the IM User.

Example 21. WaitingListService Returns <item-not-found/> Error to IM User
<iq type='error' id='remove1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'>
      <remove/>
    </item>
  </query>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

5.2 WaitingListService Interaction With InteropPartners

This section of the document describes the inter-domain protocol for communication between WaitingListServices. The protocol defined in this section MUST be implemented by ServiceProviders.

A ServiceProvider's WaitingListService MUST be configured with a list of permitted InteropPartner's WaitingListServices with which it communicates. Therefore service discovery SHOULD NOT be necessary. However, if necessary it MAY use either the Agent Information protocol or the Service Discovery protocol as described in the following examples.

Note: The InteropPartner's WaitingListService is not required to be hosted by InteropPartner, and could be hosted by a third party (e.g., a neutral phone number translation service). In this case, InteropPartner would simply advertise 'waitlist.third-party.com' as its WaitingListService.

5.2.1 ServiceProvider's WaitingListService Retrieves Current WaitingList

Example 22. ServiceProvider Discovers InteropPartner's WaitingListService by Sending Agent Information Request to InteropPartner
<iq type='get'
    from='waitlist.service-provider.com'
    to='interop-partner.com'
    id='agent2'>
  <query xmlns='jabber:iq:agents'/>
</iq>
Example 23. InteropPartner Returns Address of its WaitingListService
<iq type='result'
    from='interop-partner.com'
    to='waitlist.service-provider.com'
    id='agent2'>
  <query xmlns='jabber:iq:agents'>
    ...
    <agent jid='waitlist.interop-partner.com'>
      <name>Waiting List Service</name>
      <service>waitinglist</service>
    </agent>
    ...
  </query>
</iq>
Example 24. ServiceProvider Discovers InteropPartner's WaitingListService by Sending Service Discovery Request to InteropPartner
<iq type='get'
    from='waitlist.service-provider.com'
    to='interop-partner.com'
    id='disco3'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
Example 25. InteropPartner Returns Address of its WaitingListService
<iq type='result' id='disco3'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    ...
    <item jid='waitlist.service-provider.com'
          name='Waiting List Service'/>
    ...
  </query>
</iq>
Example 26. Service Provider Queries InteropPartner's WaitingListService for Detailed Information
<iq type='get'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='disco4'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 27. InteropPartner's WaitingListService Returns Detailed Information
<iq type='result'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='disco4'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity category='directory'
              type='waitinglist'/>
    <feature var='http://jabber.org/protocol/waitinglist'/>
  </query>
</iq>

5.2.2 ServiceProvider's WaitingListService Adds Contact to WaitingList

Once a ServiceProvider's WaitingListService has discovered the InteropPartner's WaitingListService and requested its WaitingList, the ServiceProvider's WaitingListService can add items to its WaitingList based on URI.

Example 28. ServiceProvider's WaitingListService Adds New Item to WaitingList
<iq type='set'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='waitinglist2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>contact-number</uri>
    </item>
  </query>
</iq>

If InteropPartner refuses to provide service to ServiceProvider, it MUST return a <not-authorized/> error to the ServiceProvider:

Example 29. InteropPartner Returns <not-authorized/> Error to ServiceProvider
<iq type='error'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='waitinglist2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>contact-number</uri>
    </item>
  </query>
  <error code='401' type='cancel'>
    <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If Contact's URI is not associated with a person served by this InteropPartner, the InteropPartner MUST return an <item-not-found/> error to the ServiceProvider.

Example 30. InteropPartner Returns <item-not-found/> Error to ServiceProvider
<iq type='error'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='waitinglist2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>contact-number</uri>
    </item>
  </query>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

If ServiceProvider's WaitingListService receives <not-authorized/> and/or <item-not-found/> errors from all InteropPartners, it returns a <item-not-found/> error to IM User:

Example 31. WaitingListService Returns <item-not-found/> Error to IM User
<message
    type='error'
    from='waitlist.service-provider.com'
    to='user@service-provider.com/resource'
    id='waitinglist1'>
  <waitlist xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>+1234563033083283</uri>
      <name>contact-name</name>
    </item>
  </waitlist>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</message>

If Contact's URI is associated with a person served by this InteropPartner, InteropPartner MUST return acknowledgement of the WaitingList addition to the ServiceProvider's WaitingListService.

Example 32. InteropPartner's WaitingListService Acknowledges Receipt
<iq type='result'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='waitinglist2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'/>
  </query>
</iq>

If Contact is an IM User served by InteropPartner, InteropPartner's WaitingListService pushes Contact's JID to ServiceProvider's WaitingListService.

Example 33. InteropPartner's WaitingListService Pushes Contact's JID to ServiceProvider's WaitingListService
<iq type='set'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='jidpush1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567' jid='user@domain'>
      <uri scheme='tel'>contact-number</uri>
    </item>
  </query>
</iq>
Example 34. ServiceProvider's WaitingListService Acknowledges Receipt of JID Push
<iq type='result'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='jidpush1'/>

After receiving acknowledgement (but not before), InteropPartner's WaitingListService MUST remove that item from the WaitingList for the ServiceProvider's WaitingListService.

5.2.3 ServiceProvider's WaitingListService Removes Contact from WaitingList

Example 35. ServiceProvider Requests Removal of Item from WaitingList
<iq type='set'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='remove2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'>
      <remove/>
    </item>
  </query>
</iq>

If item exists on WaitingList, InteropPartner's WaitingListService removes item from list and returns result to ServiceProvider's WaitingListService.

Example 36. InteropPartner Returns Result to ServiceProvider
<iq type='result'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='remove2'/>

If item does not exist on WaitingList, InteropPartner's WaitingListService MUST return an <item-not-found/> error to the ServiceProvider's WaitingListService.

Example 37. InteropPartner Returns <item-not-found/> Error to ServiceProvider
<iq type='error'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='remove2'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567'>
      <remove/>
    </item>
  </query>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>

6. Implementation Notes

  1. Protocols and mechanisms for inviting a Contact to register as an IM User are out of scope for this document and shall be determined by each InteropPartner individually.

  2. A ServiceProvider's WaitingListService MUST record which of its IM Users have requested the JID associated with Contact's URI, and an InteropPartner's WaitingListService MUST record that Service Provider's WaitingListService (not User) has requested JID associated with Contact's URI. Therefore when Contact registers, InteropPartner's WaitingListService informs its local users as well as ServiceProvider's WaitingListService, and ServiceProvider's WaitingListService informs its local users.

  3. The InteropPartner's WaitingListService is not required to be hosted by InteropPartner, and could be hosted by a third party (e.g., a neutral phone number translation service). In this case, InteropPartner would simply advertise 'waitlist.third-party.com' as its WaitingListService.

  4. Once an IM User learns a Contact's JID, the IM User MAY send a normal subscription request to the Contact, setting the "to" address to Contact's JID. This interaction is defined in the base XMPP specifications and is out of scope for this document.

  5. For historical reasons, implementations MUST support the older Agent Information protocol (XEP-0094) and SHOULD support Service Discovery (XEP-0030). Note well that the Agent Information protocol will eventually be deprecated in favor of Service Discovery.

  6. An IM User's client receives WaitingList information either through a "JID push" message (received from WaitingListService at any time) or in the IQ result received after requesting the WaitingList (since one or more of the WaitingList items may contain a JID). (The same rule applies to a ServiceProvider's WaitingListService that receives an IQ set from an InteropPartner's WaitingListService.)

  7. When an IM User logs in, the user's client SHOULD request the current WaitingList.

  8. Although the examples in this document show the hostname of the WaitingListService as 'waitlist.third-party.com' (etc.), this is for convenience only; the hostname MAY be any valid DNS hostname.

  9. When sending JID pushes, an implementation MAY specify a message type of 'headline', which in some deployments will prevent such messages from being stored offline for later delivery.

  10. It can happen that WaitingListService does not receive a reply from InteropPartner within a certain amount of time or the connection to InteropPartner times out. Because such behavior is often transient, WaitingListService MAY attempt to reconnect and then resend the request (although any retry logic to handle these cases is a matter of implementation). However, WaitingListService SHOULD NOT return an <item-not-found/> error to IM User unless it knows definitively that the Contact's InteropPartner is permanently unavailable, since returning an <item-not-found/> error in response to temporary connection timeouts is likely to be misleading.

7. Security Considerations

A ServiceProvider's WaitingListService MUST be configured with a list of permitted InteropPartners with which it communicates. The WaitingListService SHOULD NOT communicate with any InteropPartners that are not on the list.

Requesting JIDs via WaitingLists is not bidirectional; i.e., a service MUST NOT allow an IM User to discover a Contact's non-XMPP URI based on the Contact's JID.

A service MAY require a Contact to approve the disclosure of the Contact's JID, either as a global preference or for each request; however, this is a local policy matter.

8. IANA Considerations

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

9. XMPP Registrar Considerations

9.1 Protocol Namespaces

The XMPP Registrar [12] includes 'http://jabber.org/protocol/waitinglist' in its registry of protocol namespaces.

9.2 Service Discovery Identities

The Jabber Registar includes a type of "waitinglist" in the "directory" category in its registry of service discovery identities.

9.3 Service Discovery Features

The XMPP Registrar includes supported URI schemes in its registry of service discovery features. These features shall be of the form 'http://jabber.org/protocol/waitlist/schemes/SCHEME-NAME'.

This document registers the following two namespace names for URI schemes, but others MAY be registered in the future using standard registration procedures:

10. XML Schema

<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/protocol/waitinglist'
    xmlns='http://jabber.org/protocol/waitinglist'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0130: http://www.xmpp.org/extensions/xep-0130.html
    </xs:documentation>
  </xs:annotation>

  <xs:import namespace='jabber:client'
             schemaLocation='http://xmpp.org/schemas/jabber-client.xsd'/>

  <xs:annotation>
    <xs:documentation>
      Note: there are two allowable root elements for the
      'http://jabber.org/protocol/waitinglist' namespace,
      query and waitlist. The query element is used within
      IQ stanzas and the waitlist element is used within
      message stanzas. See XEP-0130 for details.
    </xs:documentation>
  </xs:annotation>

  <xs:element name='waitlist'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='item'
                    minOccurs='0'
                    maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name='query'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='item'
                    minOccurs='0'
                    maxOccurs='unbounded'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name='item'>
    <xs:complexType>
      <xs:choice minOccurs='0'
                 maxOccurs='unbounded'
                 xmlns:xmpp='jabber:client'>
        <xs:sequence>
          <xs:element ref='uri'/>
          <xs:element ref='name' minOccurs='0'/>
          <xs:element ref='xmpp:error' minOccurs='0'/>
        </xs:sequence>
        <xs:element ref='remove'/>
      </xs:choice>
      <xs:attribute name='id'
                    type='xs:string'
                    use='optional'/>
      <xs:attribute name='jid'
                    type='xs:string'
                    use='optional'/>
      <xs:attribute name='type'
                    use='optional'>
        <xs:simpleType>
          <xs:restriction base='xs:NCName'>
            <xs:enumeration value='error'/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name='uri'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='xs:string'>
          <xs:attribute name='scheme'
                        type='xs:NCName'
                        use='required'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>

  <xs:element name='name' type='string1023'/>

  <xs:element name='remove' type='empty'/>

  <xs:simpleType name='string1023'>
    <xs:restriction base='xs:string'>
      <xs:maxLength value='1023'/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>

Appendices

Appendix A: Document Information

Series
XEP
Number
0130
Publisher
XMPP Standards Foundation
Status
Deprecated
Type
Historical
Version
1.4.1
Last Updated
2021-03-04
Expires
2012-10-18
Approving Body
XMPP Council
Dependencies
XMPP Core, XMPP IM, XEP-0094, XEP-0030
Supersedes
None
Superseded By
None
Short Name
waitinglist
Schema
<http://www.xmpp.org/schemas/waitinglist.xsd>
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/
Yehezkel Dallal
Email
yehezkeld@followap.com
Alexandre Nolle
Email
anolle@francetelecom.com
Jean-Louis Seguineau
Email
jean-louis.seguineau@antepo.com
JabberID
jlseguineau@im.antepo.com
Mark Troyer
Email
mtroyer@jabber.com
JabberID
mtroyer@corp.jabber.com
Valerie Mercier
Email
valerie.mercier@orange-ftgroup.com
JabberID
vmercier@jabber.com

Copyright

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

Permissions

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 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.

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

3. RFC 3966: The tel URI for Telephone Numbers <http://tools.ietf.org/html/rfc3966>.

4. RFC 2368: The mailto URL scheme <http://tools.ietf.org/html/rfc2368>.

5. RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax <http://tools.ietf.org/html/rfc3986>.

6. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.

7. XEP-0094: Agent Information <https://xmpp.org/extensions/xep-0094.html>.

8. XEP-0086: Error Condition Mappings <https://xmpp.org/extensions/xep-0086.html>.

9. Even if WaitingListService returns Contact JID in the IQ-result, it MUST also send a "JID push" message.

10. When waiting list information is included in a message stanza, the root element for the 'http://jabber.org/protocol/waitinglist' namespace is <waitlist/> rather than <query/> (as used within IQ stanzas). This disparity is historical and tracks the protocol syntax that was most widely implemented, as defined in version 0.4 of this specification. In the interest of interoperability, the IQ usage was changed back to <query/> in version 1.1 of this specification. If this document were not historical, the root element usage would be harmonized to use only the <waitlist/> element.

11. 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/>.

12. 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 1.4.1 (2021-03-04)

    Cross-document editorial adjustments for inclusive language.

    mw
  2. Version 1.4 (2012-04-18)

    Changed status to Deprecated, per a vote of the XMPP Council.

    psa
  3. Version 1.3 (2006-09-13)
    Clarified alternate flow for main use case; corrected order of errors and JID pushes; specified that item removal is always the responsibility of the IM user; removed remote-server-not-found example (use item-not-found instead).
    psa
  4. Version 1.2 (2006-01-24)
    Adjusted remote-server-timeout flow to recommend IQ result followed by JID push message.
    psa
  5. Version 1.1 (2005-11-30)
    Harmonized root element specification with implemented usage, reversing change made in version 0.5.
    psa
  6. Version 1.0 (2005-08-26)
    Per a vote of the Jabber Council, advanced status to Active.
    psa
  7. Version 0.6 (2005-08-16)
    Added error case for remote server timeout; specified client and service responsibilities regarding removal of waiting list items in error cases.
    psa
  8. Version 0.5 (2005-05-16)
    Corrected schema and IQ examples by changing root element for namespace from <query/> to <waitlist/> (this had been used for message examples but not IQ examples).
    psa
  9. Version 0.4 (2005-04-01)
    Changed document type to Informational; corrected Remote Server Error example to use <remote-server-not-found/> rather than <service-unavailable/>; added service discovery identity to XMPP Registrar Considerations; corrected text regarding registration of service discovery features; corrected some small errors in the text, examples, and schema.
    psa
  10. Version 0.3 (2004-09-27)
    Corrected error syntax used when Contact URI is not handled by any InteropPartner.
    psa
  11. Version 0.2 (2004-09-03)
    Added alternate flow for situation in which Contact URI is not handled by any InteropPartner; changed headline message type for JID pushes from SHOULD to MAY; clarified semantics of item ID; added name child of item; corrected and updated the XML schema; updated examples to use XMPP error conditions.
    psa
  12. Version 0.1 (2004-03-18)
    Initial version.
    psa
  13. Version 0.0.10 (2003-09-03)
    Fixed several small errors in the examples.
    psa
  14. Version 0.0.9 (2003-08-22)
    Specified optional use of message type 'headline'; fixed one small error in the examples.
    psa
  15. Version 0.0.8 (2003-07-23)
    Changed client-server push mechanism to use <message/> rather than <iq/>, since client may not be online; allowed IQ result to include waitlist information if known; added more detailed disco#info lookup to support discovery of URI types supported.
    psa
  16. Version 0.0.7 (2003-07-02)
    Modified to use a generic <uri scheme=''/> element.
    psa
  17. Version 0.0.6 (2003-06-26)
    Refactored protocol to use IQ sets that are "pushed" to the component or client (similar to XMPP rosters); added service discovery and agents support; made text more generic; simplified error handling; change name to "Waiting Lists".
    psa
  18. Version 0.0.5 (2003-06-24)
    Added remove use case and protocol; added XML schema.
    psa
  19. Version 0.0.4 (2003-06-19)
    Specified protocol.
    psa
  20. Version 0.0.3 (2003-06-18)
    Simplified requirements; defined main use case.
    psa
  21. Version 0.0.2 (2003-06-16)
    Converted to XML format; formalized use case definitions; minor editorial changes.
    psa
  22. Version 0.0.1 (2003-06-10)
    First draft.
    an

Appendix I: Bib(La)TeX Entry

@report{saint-andre2003waitinglist,
  title = {Waiting Lists},
  author = {Saint-Andre, Peter and Dallal, Yehezkel and Nolle, Alexandre and Seguineau, Jean-Louis and Troyer, Mark and Mercier, Valerie},
  type = {XEP},
  number = {0130},
  version = {1.4.1},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0130.html},
  date = {2003-06-10/2021-03-04},
}

END