publishSelfPresence 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 her presence data available to subscribers.
Syntax
<publishSelfPresence rid="6">
<cwaCategory name="state" instanceMask="805306368">
<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="machineState" manual="false">
<availability>5000</availability>
</state>
</cwaCategory>
</publishSelfPresence>
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 or more |
An instance of category to be published. |
Remarks
This request is process as a transaction in which multiple categories can be published with one Publish request. If the request succeeds, all the categories are published. If the request fails, none of the categories are published.
This request 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.
Examples
XML example of the request to set the presence note
<publishSelfPresence rid="3">
<cwaCategory name="CustomNote">
<note value="MyNote Publish 12345" />
</cwaCategory>
</publishSelfPresence>
XML example of the request to the caller's status
<publishSelfPresence rid="4">
<cwaCategory name="userState">
<state availability="3500" set="manual" />
</cwaCategory >
</publishSelfPresence>
XML example of the request to set the caller'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">
<userInformation xmlns="http://schemas.microsoft.com/2006/09/sip/options/userInformation">
<phones>
<phone type="work">
<uri>tel:46867576</uri>
<displayString>12345</displayString>
<publish>true</publish>
<readOnly>false</readOnly>
</phone>
<phone type="home">
<uri>tel:46867576123</uri>
<displayString>12345</displayString>
<publish>true</publish>
<readOnly>false</readOnly>
</phone>
<phone type="ip">
<uri>tel:9675645</uri>
<displayString>12345</displayString>
<publish>false</publish>
<readOnly>false</readOnly>
</phone>
<phone type="custom1">
<uri>tel:013467</uri>
<displayString>12345</displayString>
<publish>true</publish>
<readOnly>false</readOnly>
</phone>
<phone type="other">
<uri>tel:907865</uri>
<displayString>12345</displayString>
<publish>true</publish>
<readOnly>true</readOnly>
</phone>
</phones>
</userInformation>
</cwaCategory>
</publishSelfPresence>
<publishSelfPresence rid="35">
<cwaCategory name="alerts">
<alerts alertForPresenceChange="true"
alertForTaggedContacts="true"
suspendAlertsForTaggedContactsWhenBusy="true"
suspendAlertsForTaggedContactsWhenDND="true"
alertForIncomingConversation="true"
suspendAlertsForIncomingConversationWhenDND="true"
showMessageTextForIncomingConversation="true"
playSoundFeedback="true"
suspendSoundWhenBusy="false"
suspendSoundWhenDND="true">
</alerts>
</cwaCategory>
</publishSelfPresence>
</cwaRequests>