Share via


Enhanced Presence Category Instances

A particular piece of presence data corresponds to a category instance of the given category name. To indicate that a user is available while attending a meeting, a unified communications application can publish a presence state category instance containing the following presence state value:

<state xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xsi:type="userState" 
       xmlns="https://schemas.microsoft.com/2006/09/sip/state">
   <availability>3500</availability>
   <activity>
      <custom LCID="1033">Meeting at 7/1234</custom>
   </activity>
</state>

In addition to the presence data value, a category instance is also characterized by the following operational attributes:

Category instance attribute

Description

Category Name

Identifies the type of presence data. This name is also the name of the XML element of a category instance.

Instance ID

Identifies a specific category instance of a given name in a specified container. Instance IDs primarily serve to identify the presence sources of multiple instances of the same category name. It can also be used to distinguish different portions of the same presence data.

Container ID

Identifies the container where the category instance is published.

Version

Used by the server to synchronize publishing of the category instance. A client must present a version number when publishing a category instance. The server is responsible for incrementing the version number of a category instance.

Expiry Type

Specifies the life-time type for the publication of a category instance.

Expiration

Specifies the time when the publication of a category instance expires.

Publication Time

Specifies the time when a category instance was last published.

These category instance attributes are the metadata necessary for identifying, organizing, manipulating, and maintaining category instances throughout their life-cycle.

At the protocol level, category instances are transmitted as XML strings. The enhanced presence schemas discussed in this document apply to the data types of category instance values only. They do not define the syntax of the operational attributes of category instances.

The following XML string shows a list of contactCard category instances that are transmitted in a subscription:

<categories xmlns="https://schemas.microsoft.com/2006/09/sip/categories" 
            uri="sip:john.doe@contoso.com">
   <category name="contactCard" instance="0" publishTime="2010-02-04T03:43:49.370" >
      <contactCard xmlns="https://schemas.microsoft.com/2006/09/sip/contactcard" >
        <identity>
           <name>
              <displayName>John Doe</displayName>
           </name>
           <email>john.doe@contoso.com</email>
         </identity>
      </contactCard>   </category>

   <category name="contactCard" instance="3" publishTime="2010-02-18T05:08:26.060">
      <contactCard xmlns="https://schemas.microsoft.com/2006/09/sip/contactcard"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <company>CONTOSO INC</company>
         <title>SENIOR WRITER II</title>
         <office>HOME OFFICE-MOBILE</office>
         <phone type="work">
            <uri>tel:+14255550100;ext=12222</uri>
         </phone>
      </contactCard>
   </category>
   <category name="contactCard" instance="4" publishTime="2010-02-18T05:08:14.427">
     <contactCard xmlns="https://schemas.microsoft.com/2006/09/sip/contactcard" isUCEnabled="true">   </contactCard>
   </category>

   <category name="contactCard" instance="6" publishTime="2010-01-10T22:08:16.677">
      <contactCard xmlns="https://schemas.microsoft.com/2006/09/sip/contactcard">
         <title>SENIOR WRITER II</title>
         <office>HOME OFFICE-MOBILE</office>
         <delimiter xmlns:auto-ns1="https://schemas.microsoft.com/2006/09/sip/contactcard"
                  xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"></delimiter>
         <delimiter xmlns:auto-ns1="https://schemas.microsoft.com/2006/09/sip/contactcard"
                  xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"></delimiter>
         <displayADPhoto>false</displayADPhoto>
      </contactCard></category></categories>

All operational attributes do not appear in category instances received in a subscription because the values of certain operational attribute should be confidential. For example, container IDs are excluded from the previous example because containers are the means used by publisher to control who can access a publication.

The following XML example shows a list of state category instances transmitted in a publication. The container ID, version number, and expiry type is specified.

<publish xmlns="https://schemas.microsoft.com/2006/09/sip/rich-presence">
   <publications uri="sip:mary@contoso.com">
      <publication categoryName="state" instance="945175315" container="2" 
                   version="1" expireType="endpoint">
         <state xmlns="https://schemas.microsoft.com/2006/09/sip/state" 
                manual="false" xsi:type="machineState" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           <availability>5000</availability>
           <delimiter xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"/>
           <timeZoneBias>480</timeZoneBias>
           <timeZoneName>Pacific Standard Time</timeZoneName>
           <timeZoneAbbreviation>Pacific Standard Time</timeZoneAbbreviation>
           <device>computer</device>
           <end xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"></end>
         </state>
      </publication>
      <publication categoryName="state" instance="945175315" container="3" 
                   version="1" expireType="endpoint">
         <state manual="false" xsi:type="machineState" 
                xmlns="https://schemas.microsoft.com/2006/09/sip/state" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <availability>5000</availability>
            <delimiter xmlns:auto-ns1="https://schemas.microsoft.com/2006/09/sip/state" 
                       xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"/>
               <timeZoneBias>480</timeZoneBias>
               <timeZoneName>Pacific Standard Time</timeZoneName>
               <timeZoneAbbreviation>Pacific Standard Time</timeZoneAbbreviation>
               <device>computer</device>
               <end xmlns:auto-ns1="https://schemas.microsoft.com/2006/09/sip/state" 
                    xmlns="https://schemas.microsoft.com/2006/09/sip/commontypes"></end>
         </state>
      </publication>
   </publications>
</publish>