This documentation is archived and is not being maintained.

Examples of Publishing Selected Categories

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.

The following XML examples are intended to provide guidance on publishing a variety of categories, including contactCard, machineState, note, services, and userState.

For more information about these categories, see [MS-PRES]: Presence Protocol Specification. For more information about the Enhanced Presence Schema, see Unified Communications Enhanced Presence Schemas for Microsoft Office Communications Server 2007.

The contactCard category contains personal information about a contact.

<contactCard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns="http://schemas.microsoft.com/2006/09/sip/contactcard">
  <identity>
    <email>joan@contoso.com</email>
  </identity>
  <address>
    <street>123 Elm St.</street>
    <city>Woburn</city>
    <state>MA</state>
    <zipcode>98760</zipcode>
  </address>
  <company>Contoso Corporation</company>
  <title>Developer</title>
</contactCard>

The machineState category contains information about the computer or device that a contact is using.

<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= xsi:type="machineState"
  xmlns="http://schemas.microsoft.com/2006/09/sip/state">
  <availability>3500</availability>
</state>

The note category describes a presence note. The body element contains the text of the note, as well as attributes that can be used to indicate the type of the note, the time period during which the note is valid, and other information.

<note xmlns="http://schemas.microsoft.com/2006/09/sip/note">
  <body type="personal" uri="joan@contoso.com ">I will be away from the office until June 3.</body>
</note>

The services category contains a list of one or more service elements. Each service element describes presence capabilities of a device, such as whether it is capable of rendering or capturing text, audio, or video.

<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2006/09/sip/service">
  <service uri="sip:joan@contoso.com">
    <capabilities>
      <text render="true" capture="true" publish="true"/>
    </capabilities>
  </service>
</services>

The userState category descibes a user’s current availability and activity. The following table shows some of the states and availability values that are used by Office Communicator.

State

Numeric value

Available

3500

Busy

6500

Do Not Disturb

9500

Be Right Back

12500

Away

15500

<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xsi:type="userState" manual="true" xmlns="http://schemas.microsoft.com/2006/09/sip/state">
  <availability>3500</availability>
</state>
Show: