JEP-0130: Waiting Lists

This JEP 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.


WARNING: This Informational JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the best practice or protocol profile described herein is encouraged in exploratory implementations, although production systems should not deploy implementations of this protocol until it advances to a status of Draft.


JEP Information

Status: Experimental
Type: Informational
Number: 0130
Version: 0.4
Last Updated: 2005-04-01
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, XMPP IM, JEP-0094, JEP-0030
Supersedes: None
Superseded By: None
Short Name: waitlist

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

Yehezkel Dallal

Email: yehezkeld@followap.com

Alexandre Nolle

Email: anolle@francetelecom.com

Jean-Louis Seguineau

Email: jean-louis.seguineau@antepo.com
JID: jlseguineau@im.antepo.com

Mark Troyer

Email: mtroyer@jabber.com
JID: mtroyer@corp.jabber.com

Legal Notice

This Jabber Enhancement Proposal is copyright 1999 - 2005 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.jabber.org/jsf/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at <http://www.opencontent.org/openpub/>).

Discussion Venue

The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.

Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocols defined in this JEP have been developed outside the Internet Standards Process and are to be understood as extensions to XMPP rather than as an evolution, development, or modification of XMPP itself.

Conformance Terms

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


Table of Contents

1. Introduction
2. Glossary
3. Requirements
4. Use Cases
4.1. IM User Retrieves Current WaitingList
4.1.1. Primary Flow
4.1.2. Alternate Flows
4.2. IM User Adds Contact to WaitingList
4.2.1. Primary Flow
4.2.2. Alternate Flows
4.3. IM User Removes Contact from WaitingList
4.3.1. Primary Flow
4.3.2. Alternate Flows
5. Protocol
5.1. IM User Interaction With WaitingListService
5.1.1. IM User Retrieves Current WaitingList
5.1.2. IM User Adds Contact to WaitingList
5.1.3. IM User Removes Contact from WaitingList
5.2. WaitingListService Interaction With InteropPartners
5.2.1. ServiceProvider's WaitingListService Retrieves Current WaitingList
5.2.2. ServiceProvider's WaitingListService Adds Contact to WaitingList
5.2.3. ServiceProvider's WaitingListService Removes Contact from WaitingList
6. Implementation Notes
7. Security Considerations
8. IANA Considerations
9. Jabber Registrar Considerations
9.1. Protocol Namespaces
9.2. Service Discovery Identities
9.3. Service Discovery Features
10. XML Schema
Notes
Revision History


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 RFC 3920 [1] and RFC 3921 [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

Table 1: Terms Used

Term Definition
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 <user@domain> ("bare JID"); within the context of an IM session, a JID is of the form <user@domain/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 MUST enable an IM User to:

  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 MUST enable a ServiceProvider to:

  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 SHOULD first complete use case for "IM User Retrieves Current WaitingList".
  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 acknowledges addition of Contact to IM User's WaitingList.
  6. WaitingListService determines that Contact's URI does not belong to a person served by ServiceProvider [A3].
  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. OPTIONALLY, WaitingListService requires that Contact approves request.
  12. InteropPartner's WaitingListService informs ServiceProvider's WaitingListService of JID associated with Contact's URI. [A6]
  13. ServiceProvider's WaitingListService informs IM User of Contact's JID. [A8]
  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.
    2. Use Case Ends unsuccessfully.
  2. The information provided is not a valid URI:
    1. WaitingListService sends <bad-request/> or <remote-server-not-found/> error to IM User.
    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. OPTIONALLY, WaitingListService requires that Contact approves request.
    3. WaitingListService informs IM User of Contact's JID.
    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. Use Case Ends unsuccessfully.
  5. Contact is not an IM User registered with InteropPartner:
    1. InteropPartner records 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. Use Case Ends.
  6. Contact denies request:
    1. InteropPartner's WaitingListService sends <not-authorized/> error to ServiceProvider's WaitingListService.
    2. ServiceProvider's WaitingListService sends <not-authorized/> error (or local equivalent) 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. 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. Use Case Ends.

4.3 IM User Removes Contact from WaitingList

An IM User may want to remove an item from its WaitingList.

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. Support for the protocol defined in this section is NOT REQUIRED for services that do not implement XMPP as their local protocol.

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 [6] or the deprecated Agent Information [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:

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@jabber.org</uri>
      <name>JEP 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='request1'>
  <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@jabber.org</uri>
      <name>JEP 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 JEP 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>
        

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.

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

(For information about error syntax, refer to Error Condition Mappings [8].)

If the IM User included a JID in the request, WaitingListService sends <bad-request/> error to IM User. (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 a URI that is not served by an InteropPartner (e.g., a phone number associated with a telephony provider that is not in the WaitingListService's whitelist of InteropPartners), WaitingListService MAY send a <remote-server-not-found/> error to IM User.

Example 13. WaitingListService Returns <remote-server-not-found/> Error to IM User

<iq type='error' id='waitinglist1'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item>
      <uri scheme='tel'>contact-number</uri>
      <name>contact-name</name>
    </item>
  </query>
  <error code='404' type='cancel'>
    <remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
        

If none of the foregoing errors was generated but the WaitingListService does not immediately know the Contact JID, 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 WaitingListService knows Contact JID when the IQ result is returned to the user, it MAY include the WaitingList item in the IQ result:

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 WaitingListService knows Contact JID (or learns Contact JID from InteropPartner), it MUST inform IM User through a "JID push" message:

Example 16. 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 <message/> because the WaitingListService has no knowledge of the user's presence and therefore cannot assume that an IQ will be received by the user at a specific resource.

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

Example 17. 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>
        

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 18. 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 19. 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 20. WaitingListService Returns <item-not-found/> Error to IM User

<iq type='error' id='waitinglist4'>
  <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 "whitelist" of 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 21. 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 22. 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 23. 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='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
        

Example 24. InteropPartner 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 25. Service Provider Queries InteropPartner's WaitingListService for Detailed Information

<iq type='get'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='disco2'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
        

Example 26. InteropPartner's WaitingListService Returns Detailed Information

<iq type='result'
    from='waitlist.interop-partner.com'
    to='waitlist.service-provider.com'
    id='disco2'>
  <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 27. 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 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 28. 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 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 29. 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 30. 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='jidpush4'>
  <query xmlns='http://jabber.org/protocol/waitinglist'>
    <item id='34567' jid='user@domain'>
      <uri scheme='tel'>contact-number</uri>
    </item>
  </query>
</iq>
        

Example 31. ServiceProvider's WaitingListService Acknowledges Receipt of JID Push

<iq type='result'
    from='waitlist.service-provider.com'
    to='waitlist.interop-partner.com'
    id='jidpush4'/>
        

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 32. 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 33. 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 34. 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 proposal 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 (JEP-0094) and SHOULD support Service Discovery (JEP-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 JEP 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.

7. Security Considerations

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

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 JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) [9].

9. Jabber Registrar Considerations

9.1 Protocol Namespaces

The Jabber Registrar [10] shall include 'http://jabber.org/protocol/waitinglist' in its registry of protocol namespaces.

9.2 Service Discovery Identities

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

9.3 Service Discovery Features

The Jabber Registrar shall include 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 JEP 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:import namespace='jabber:client'/>

  <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='1'>>
        <xs:sequence xmlns:xmpp='jabber:client'>
          <xs:element ref='uri' minOccurs='1' maxOccurs='1'/>
          <xs:element ref='name' minOccurs='0' maxOccurs='1'/>
          <xs:element ref='xmpp:error' minOccurs='0' maxOccurs='1'/>
        </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' type='xs:string'>
    <xs:complexType>
      <xs:attribute name='scheme'
                    type='xs:NCNAME'
                    use='required'/>
    </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>
    


Notes

1. RFC 3920: Extensible Messaging and Presence Protocol (XMPP): Core <http://www.ietf.org/rfc/rfc3920.txt>.

2. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://www.ietf.org/rfc/rfc3921.txt>.

3. RFC 3966: The tel URI for Telephone Numbers <http://www.ietf.org/rfc/rfc3966.txt>.

4. RFC 2368: The mailto URL scheme <http://www.ietf.org/rfc/rfc2368.txt>.

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

6. JEP-0030: Service Discovery <http://www.jabber.org/jeps/jep-0030.html>.

7. JEP-0094: Agent Information <http://www.jabber.org/jeps/jep-0094.html>.

8. JEP-0086: Error Condition Mappings <http://www.jabber.org/jeps/jep-0086.html>.

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

10. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.


Revision History

Version 0.4 (2005-04-01)

Changed JEP type to Informational; corrected Remote Server Error example to use <remote-server-not-found/> rather than <service-unavailable/>; added service discovery identity to Jabber Registrar Considerations; corrected text regarding registration of service discovery features; corrected some small errors in the text, examples, and schema. (psa)

Version 0.3 (2004-09-27)

Corrected error syntax used when Contact URI is not handled by any InteropPartner. (psa)

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)

Version 0.1 (2004-03-18)

Initial version (see XML source for earlier revisions). (psa)


END