Share via


publishSelfPresence 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 her presence data available to subscribers.

Syntax

<publishSelfPresence 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

cwaCategory

1 or more

An instance of category to be published.

Remarks

publishSelfPresence is the envelope that contains any self-presence category data the local client requests to publish to a Communicator Web Access Server. A single publishSelfPresence element can contain a cwaCategory for each category/instance published. A publishSelfPresence request must be made when the local user has changed any self presence information they want to be published to subscribing users. For example: If the local user has changed her presence note, a publishSelfPresence request is made containing the category note.

The instanceMask of the cwaCategory element indicates the type of category information published. For more information about instanceMask values for different category, see cwaCategory element.

A publishSelfPresence request for user state should be made on a 5-minute timer. The client application is responsible for publishing both the user state and the machine state. If the Unified Communications AJAX API Client application does not detect any activity for 5 minutes, a machine state of idle and a user state of awayshould be published.

The Communicator Web Access client uses the following logic: If client does not detect any activity for 5 minutes (configurable), the client publishes machineState category with availability 5000 and enter Inactive status. If client does not detect any activity for 15 minutes (configurable) in Inactive status, the client publishes machineState category with availability 15500 and enter Away status. If client detect user activity in above two statues, the client publishes machineState category with availability 3500 and go back to normal status.

Examples

XML example of the request to set the presence note

<publishSelfPresence rid="3">
   <cwaCategory name="note" instanceMask="0">
       <note >
          <body type="personal">A personal note</body>
       </note>
   </cwaCategory>
</publishSelfPresence>

XML example of the request to publish a local user's state

<publishSelfPresence rid="29">
   <cwaCategory name="state" instanceMask="536870912">
      <state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state" xsi:type="userState" manual="true">
        <availability>3500</availability>
   </cwaCategory>
</publishSelfPresence>

XML example of the request to publish the local user's phones

<?xml version="1.0" encoding="UTF-8"?>
<CwaRequests sid="52" xmlns="http://schemas.microsoft.com/2006/09/rtc/cwa">
   <publishSelfPresence rid="34">
      <cwaCategory name="userInformation">
         <userInfo>
            <phones>
               <phone type="work"><publish>true</publish><readOnly>false</readOnly><displayString>11111</displayString></phone>
               <phone type="mobile"><publish>true</publish><readOnly>false</readOnly><displayString>22222</displayString></phone>
               <phone type="home"><publish>false</publish><readOnly>false</readOnly><displayString>33333</displayString></phone>
               <phone type="other"><publish>true</publish><readOnly>false</readOnly><displayString>44444</displayString></phone>
            </phones>
         </userInfo>
      </cwaCategory>
   </publishSelfPresence>

XML example of the request to publish the local user's alerts

   <publishSelfPresence rid="35">
      <cwaCategory name="alerts" container="1">
         <alerts  alertForPresenceChange="true"
                  alertForTaggedContacts="true"
                  suspendAlertsForTaggedContactsWhenBusy="true"
                  suspendAlertsForTaggedContactsWhenDND="true"
                  alertForIncomingConversation="true"
                  suspendAlertsForIncomingConversationWhenDND="true"
                  showMessageTextForIncomingConversation="true"
                  playSoundFeedback="true"
                  suspendSoundWhenBusy="false"
                  suspendSoundWhenDND="true"/>
      </cwaCategory>
   </publishSelfPresence>
</CwaRequests>

See Also

Concepts

cwaCategory Element

container Element