Share via


queryPresence 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.

Allows the Unified Communications AJAX API Client application user to make a one-time request for the presence of another user.

Syntax

<queryPresence rid="21">
   <uris>
      <uri>sip:jessicaa@contoso.com</uri>
   </uris>
</queryPresence>

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

cwaRequests

Contains one or more methods that a Unified Communications AJAX API Client sends to a Communicator Web Access Server.

Child Element

Element

Occurrence

Description

uris

1

The list of URI (users) whose presence is queried.

Remarks

This element accepts a list of URI values so that only a single request is needed when the user is querying for the presence of multiple users.

The categories that are subscribed to can be those statically configured using the cwaCategoryFilter parameter of the initiateSession request. If this is not set, well-known categories of Communicator are used as default.

Examples

XML example of the request

Jeff Smith an employee of Contoso.com is requesting the presence information for Jessica at Contoso.com

<cwaRequests xmlns="http://schemas.microsoft.com/2006/09/rtc/cwa" sid="91">
    <queryPresence rid="4">
      <uris>
          <uri>sip:jessicaa@contoso.com</uri>
      </uris>
    </queryPresence>
</cwaRequests>

XML example of the events as the result of the request

<cwaEvents pollWaitTime="3000" ackId="87" sid="3494">
  <userPresence eid="87">
    <user uri=" sip:jessicaa@contoso.com " sourceNetwork="sameEnterprise">
      <cwaCategory name="state" instance="1" version="0" publishTime="2007-09-24T19:49:16Z">
        <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state">
          <availability>15500</availability>
        </state>
      </cwaCategory>
      <cwaCategory name="services" instance="0" version="0" publishTime="2007-09-24T19:49:16Z">
        <services xmlns="http://schemas.microsoft.com/2006/09/sip/service">
          <service uri=" sip:jessicaa@contoso.com ">
            <capabilities>
              <text render="true" capture="true" deviceAvailability="15500" />
              <gifInk render="true" capture="false" deviceAvailability="15500" />
              <isfInk render="true" capture="false" deviceAvailability="15500" />
            </capabilities>
          </service>
        </services>
      </cwaCategory>
    </user>
  </userPresence>
</cwaEvents>