userPresence Element
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 the envelope for receiving the presence information of other users.
Syntax
<userPresence eid="integer value"/>
Attributes
Attribute |
Data Type |
Description |
---|---|---|
Eid |
integer |
Event Id. This is an integer value assigned by the Communicator Web Access Server. |
Element Information
Parent Element
Element |
Description |
---|---|
Holds the responses from the asynchronous data channel with which a Unified Communications AJAX API Client polls the server for updates that have taken place. |
Child Elements
Element |
Occurrences |
Description |
---|---|---|
1 or more |
The user and his list of category data. |
Remarks
This envelope returns the presence data that was requested by the queryPresence request. The requesting user gets presence information according to his or her presence level as assigned by the queried user. A userPresence element can be returned as a result of a query or subscription by a local user.
When a subscribed user changes presence values such as published telephone numbers, the Communicator Web Access Server notifies all subscribing users of the change by sending a userPresence Event containing a new snapshot of the subscribed users published presence. The presence information returned in this event is determined by the access level of the subscribing user. For example: If the subscribing user has the access level of 100 (public), the private telephone number or other non-public presence data is not in the received userPresence Event.
Examples
The presence information for Jay A. was queried using the queryPresence request. From the response, you can see that Jay A. is offline. The cwaCategorystate indicates that the availability of the user is 18000, which correspond to offline. In addition to receiving state information, the event response contains the note text designated by Jay A. for his presence status as well as his display name.
The user's presence information is contained in the userPresence envelope as demonstrated by the following XML snippet.
<userPresence eid="10">
<user uri="sip:jessicaa@contoso.com" sourceNetwork="sameEnterprise">
</user>
</userPresence>
Within the user presence envelope, presence data is provided in a series of cwaCategory envelopes. The XML in the following example demonstrates the receipt of user state, note, and contactCard. Each of these categories are further subdivided by the instance attribute of the cwaCategory element.
<cwaCategory name="state" instance="0">
<state xmlns=".../sip/state" xmlns:xsi=".../XMLSchema-instance" xsi:type="aggregateState">
<availability>18000</availability>
<activity token="Offline" />
</state>
</cwaCategory>
<cwaCategory name="note" instance="0">
<note xmlns=".../sip/note">
<body type="personal" />
</note>
</cwaCategory>
<cwaCategory name="contactCard" instance="0">
<contactCard xmlns=".../sip/contactcard">
<identity>
<name>
<displayName>Jay A.</displayName>
</name>
</identity>
</contactCard>
</cwaCategory>
<cwaCategory name="contactCard" instance="1">
<contactCard xmlns="...contactcard">
<phone type="work">
<uri>
</uri>
<displayString>(405) 111-2222</displayString>
</phone>
</contactCard>
</cwaCategory>