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 .

Publishing the contactCard Category

The contactCardcategory contains personal information about a contact.

Copy Code
<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>

Publishing the machineState Category

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

Copy Code
<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>

Publishing the note Category

The notecategory describes a presence note. The bodyelement 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.

Copy Code
<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>

Publishing the services Category

The servicescategory contains a list of one or more service elements. Each serviceelement describes presence capabilitiesof a device, such as whether it is capable of rendering or capturing text, audio, or video.

Copy Code
<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>

Publishing the userState Category

The userStatecategory 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

Copy Code
<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>