subscribePresence Request
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Represents a request to subscribe to the presence of one or more users. To subscribe means to create a request for the current presence information of a contact that expires when the requesting user has logged off of a Communicator Web Access Server.
Syntax
<subscribePresence rid="19">
<uris>
<uri>sip:jessicaa@contoso.com</uri>
</uris>
</subscribePresence>
The following sections describe attributes, parent elements, and child elements.
Attributes
Attribute |
Data Type |
Description |
---|---|---|
rid |
String |
Represents the client-assigned instance ID for this request. This is a required attribute. |
Element Information
Parent Element
Element |
Description |
---|---|
Contains one or more methods that a Unified Communications AJAX API Client sends to a Communicator Web Access Server. |
Child Element
Element |
Occurrence |
Description |
---|---|---|
1 |
A list of URI values. |
Remarks
The categories that are subscribed to can be those statically configured using the CategoryFilter parameter of the InitiateSession request. Regardless of the filter set, all well-known categories are returned.
Whereas querying for a users presence returns a single snapshot of the presence of that user, subscribing to a user presence returns the current presence of a user for the duration of a subscriber's session. As elements of the watched user's presence change, events are sent to the subscribing user representing the new presence of the watched user.
At the time a session is initiated, a client can set an attribute on the options element that determines whether a Communicator Web Access Server auto-subscribes a local user to an added contact's presence. If the autoSubscribePresenceForContacts attribute is set to false, the client must either query or subscribe to the new contact presence to receive presence.
By default, a maximum of 200 remote users can subscribe to or "watch" the presence of a user concurrently. The maximum value can be changed by an Office Communications Server administrator. Increasing the value can have a performance impact on the server.
When the maximum number of a user's "watchers" is reached, additional attempts to watch the presence of the user return an error. As remote watchers end their sessions, additional users can subscribe. For this reason, an error returned by an attempt to subscribe to the presence of a user should trigger logic to retry a subscription request.
It is not necessary for the watched user to be online for the Communicator Web Access Server to process a subscription request to the watched user's presence. The watched user's presence is returned to the subscriber with an aggregated state of offline.
Examples
XML example of the request
The logged-on user is subscribing to the presence of Jay Adams. The depth of presence information returned in this event response depends on the presence access level Jay A. has assigned to the logged-on user. If the user has the public level of presence access, they get the emailAlias and displayName back. For an in-depth discussion of presence access levels, see Publishing and Subscribing to Presence.
<subscribePresence>
<uris>
<uri>SIP:Jaya@contoso.com\</uri>
</uris>
</subscribePresence>