Share via


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

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

Syntax

<queryPresence rid="string value"/>

Attributes

Attribute

Data Type

Description

Rid

string

Request Id. This is a string value assigned by the Unified Communications client. 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 Elements

Element

Occurrences

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.

Examples

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>

Communicator Web Access server finds the user at the Sip specified in the request and returns the user presence information asynchronously on the data channel. Because Jessica works in the same enterprise as Jeff, the sourceNetwork attribute of the returned user element is sameEnterprise.

<cwaEvents pollWaitTime="1000" ackId="12" sid="91">
   <userPresence eid="12">
     <user uri="sip:jessicaa@contoso.com" sourceNetwork="sameEnterprise">
     <cwaCategory name="calendarData" instance="0" />

The cwaCategorycontactCard holds different types of contact card information in discreet instances. For example, the display name on the returned contact card information is held in instance 0 of the cwaCategorycontactCard.

     <cwaCategory name="contactCard" instance>
        <contactCard xmlns=".../sip/contactcard">
           <identity>
               <name>
                  <displayName>jessa</displayName>
               </name>
          </identity>
        </contactCard>
     </cwaCategory>
     <cwaCategory name="contactCard" instance>
        <contactCard xmlns=".../sip/contactcard">
           <phone type="work">
              <uri>tel:xxxx</uri>
              <displayString></displayString>
           </phone>
        </contactCard>
     </cwaCategory>
     <cwaCategory name="contactCard" instance>
        <contactCard xmlns=".../sip/contactcard">
          <company></company>
          <title></title>
          <office></office>
        </contactCard>
     </cwaCategory>
     <cwaCategory name="note" instance="0" />
     <cwaCategory name="state" instance="0">
        <state xsi:type="aggregateState" xmlns:xsi=".../XMLSchema- instance" xmlns=".../sip/state">
           <availability>3000</availability>
        </state>
     </cwaCategory>
   </user>
</userPresence>
</cwaEvents>

See Also

Concepts

subscribePresence Element

unsubscribePresence Element