By integrating with the Parlay X Presence over SIP/IMS Web
service implementation, your client applications can use Web services
to subscribe to a presentity, synchronously query the current presence
information for a presentity, receive asynchronous notifications about
changes in the presence information for a presentity, publish the
presence information of a presentity, and unsubscribe from a presentity.
Within an IMS deployment, IBM® WebSphere® Presence
Server interacts
with a variety of other presence-savvy endpoints (through the Pw,
Pet, Pep, and Peu reference points). As it receives presence information
for a particular presentity (an entity whose presence information
is of interest), it aggregates the information into a presence document.
Integrating with WebSphere Presence
Server,
the Parlay X Presence over SIP/IMS Web
service implementation then maps the IMS Service Control (ISC) presence
signaling into a format that is usable by Web service clients.
In response to incoming Web service requests, Parlay X Presence over SIP/IMS sends
SIP SUBSCRIBE requests to WebSphere Presence
Server.
The service implementation processes the corresponding SIP NOTIFY
messages from the presence server, and converts the rich presence
information into the Parlay X Presence model.
Call flows
When processing getUserPresence,
startPresenceNotification, and endPresenceNotification Parlay X requests,
Parlay X Presence over SIP/IMS uses
SIP SUBSCRIBE and NOTIFY signaling to communicate with the presence
server. SIP SUBSCRIBE and NOTIFY interaction is:
- An outgoing SUBSCRIBE request to the presence server.
- An incoming 2xx response to the SUBSCRIBE.
- An incoming NOTIFY request from the presence server, containing
the presence information in the message body.
- An outgoing 2xx response to the NOTIFY.
When the service processes a getUserPresence request, the outbound
SUBSCRIBE message has a SIP Expires header indicating that it is a
presence
fetch. The presence server sends only a
single NOTIFY in response.
When the service processes a startPresenceNotification
request, the outbound SUBSCRIBE message will have a SIP Expires header
indicating that it is an extended subscription. The presence server
will send an immediate NOTIFY in response, and may send future NOTIFY
messages as the underlying state of the presentity changes. Later,
the service may send additional SUBSCRIBE requests to refresh the
subscription.
When the service processes an endPresenceNotification
request, the outbound SUBSCRIBE message has a SIP Expires header indicating
that it wishes to terminate the subscription. The presence server
sends only a single NOTIFY in response.
The PUBLISH operation
When it
receives a PUBLISH operation, the
Parlay X Presence over SIP/IMS Web
service implementation performs the following tasks:
- Verifies that the input is valid and, if it is not valid, returns
the appropriate service or exception codes.
- Creates a Presence Information Data Format (PIDF) document. The
document contains the body of the PUBLISH request and the Parlay X
Presence attributes found in the request, and it specifies a content
type of application/pidf+xml. (The PIDF format is
defined in IETF RFC 3863.)
- Sends the PIDF document to the presence server.
Because the PUBLISH request does not establish a dialog,
the response to a PUBLISH request merely indicates whether the request
was successful. The presence server returns an exception when the
request is not processed successfully; otherwise it returns nothing.
Interfaces
- PresenceConsumer
- subscribePresence
- Handles a request to subscribe to the presence of one or more
users (presentities). The Web service implementation begins by checking
the validity of the requested presentity and uses information available
from the Group Resolution mediation primitive to determine whether
the presentity is a group URI. The subscribePresence operation then
takes a snapshot of the relevant configuration settings as modified
by the Web service's SOAP headers. Subsequent Parlay X Presence over SIP/IMS API
requests use the same HTTP session and the same configuration settings.
- getUserPresence
- Gets the status of a user (presentity). The Web service implementation
verifies that the input is valid. If not, it returns appropriate service
exceptions based on incorrect input values. Next, the Web service
implementation verifies that the client has previously invoked subscribePresence
and been granted authorization for the requested presence attributes.
The Web service implementation initiates a SUBSCRIBE/NOTIFY interaction
with the presence server to retrieve the relevant presence information
and returns the information to the client.
- StartNotification
- The StartNotification request, has a single global transaction
ID and its corresponding set of StatusXXX_DeliveryYYY events.
- endNotification
- Terminates a subscription that was created using startNotification.
- startPresenceNotification
- Enables an application to request that it be notified when a presentity's
presence information changes. The Web service implementation checks
the validity of the requested presentity.
- endPresenceNotification
- Enables an application to request that it no longer be notified
when a presentity's presence information changes.
- notifySubscription_DeliveryAttempted
- This marks the attempted delivery of a notification subscription.
- notifySubscription_DeliveryResult
- This marks the delivery result for a single notification subscription.
- subscriptionEnded_DeliveryAttempted
- This marks the delivery result for a subscription ending.
- subscriptionEnded_DeliveryResult
- This marks the delivery result for a single subscription that
has ended.
- PresenceSupplier
- publish
- Allows client applications to publish the presence information
for a presentity.
The following PresenceSupplier interfaces are
not supported and do not generate usage records:
- getOpenSubscriptions
- updateSubscriptionAuthorization
- getMyWatchers
- getSubscribedAttributes
- blockSubscription