Chapter_06_Enhanced_Presence.doc

May 18, 2018 | Author: Javier Mamblona | Category: Xml Schema, Data Type, Session Initiation Protocol, Xml, Microsoft Sql Server


Comments



Description

This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred. This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes. Copyright © 2011 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, Lync, MSN, SQL Server, Windows Live, and Windows PowerShell are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 2 Contributors Project Manager: Susan S. Bradley Content Architect: Rui Maximo Chapter Lead: Kurt De Ding Contributing Writers: Jared Gradle Technical Reviewers: Brian R. Ricks, Conal Walsh, Joe Schaeffer, Moustafa Noureddine, Rick Kingslan Lead Editor: Kate Gleeson Contributing Editor: Katrina Purcell Art Manager: Jim Bradley Production Editor: Kelly Fuller Blue Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 3 Table of Contents Contributors............................................................................................................... 3 Introduction................................................................................................................ 5 Enhanced Presence Data Model................................................................................. 6 Enhanced Presence Category Instances..................................................................6 Enhanced Category Instance Data..........................................................................9 Aggregated Category Instance Values and Multiple Points of Presence................13 Public and Private Category Instances..................................................................14 Categories for Application Data and Custom Presence.........................................15 Enhanced Presence Operations................................................................................ 15 Publication............................................................................................................. 15 Publishing Presences Using SIP SERVICE Requests.............................................16 Understanding Lync Server Presence Aggregation.............................................21 Controlling Access to Presence Publications with Containers.............................25 Enforcing Interoperability with Lync by Using Publication Grammars.................30 Enabling Enhanced Privacy Mode in Presence Publications................................30 Roaming Application Data.................................................................................. 35 Subscription.......................................................................................................... 36 Receiving Presence Publications by Using SIP SUBSCRIBE Requests..................37 Optimizing Lync Server Load with Presence Policy in Persistent Subscription or by Using Polling Subscription.............................................................................39 Receiving Contacts Lists before Subscribing to Their Presence..........................40 Receiving Remote Presence by Using a Persistent Subscription.........................42 Receiving Roaming Data by Using Self-Subscription..........................................46 Receiving Lync Server Configuration Settings and Other System Data by Using In-band Provisioning........................................................................................... 48 Summary.................................................................................................................. 49 Additional Resources................................................................................................ 49 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 4 Introduction Presence is an important element in facilitating efficient real-time communications. Presence refers to information used to describe an entity’s availability, willingness, or capability to communicate with other entities. The presence information can help a communicating party determine if, when, and how to contact other parties. In a Microsoft® Lync™ Server 2010 communications software deployment, a communication entity can be a user or a trusted application such as a Web service, an interactive bot, or the Lync Server Response Group application. The user corresponds to a security principle represented by an Active Directory® Domain Services User object and the trusted application is represented by an Active Directory Contact object. A communication entity that makes its presence available is referred to as a presence entity, also known as presentities. Microsoft Lync™ 2010 communications software maintains a Contacts list for the user. The Contacts list is maintained on the server running Lync Server and updated when a presence entity is added to or removed from the list. When a user signs in to Lync Server 2010 using Lync 2010, Lync 2010 receives the Contacts list from the server before Lync requests that the Lync Server subscribe to these contacts’ presence. As the results are returned, Lync displays the Contacts list together with status indicating whether contacts are available, busy, inactive, away, or offline. On a signed-in Lync 2010, the presence status is color-coded and appears before each contact's name. The following figure shows a Contacts list for Bob Kelly. Anahita is Away with a yellow status bar, whereas Cynthia is Offline with a gray status bar. The presently available contact is Help desk, which has a green status bar. Figure 1. Example of contacts’ presence shown with color coding Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 5 A busy or inactive contact. you know that the contact is likely to answer your instant message or voice call. The Away or Offline status suggests that perhaps you should send the contact an email message instead of an instant message. see the “Categories for Application Data and Custom Presence” section later in this chapter. an instance of an enhanced presence category may contain a partial or whole set of the constituent types of presence information. availability. The category name corresponds to the name of the XML element of the category instance value. and a photograph of the contact. Together. as part of the state category instances. Lync Server requires that a category name be registered with Lync Server. Enhanced Presence Category Instances A specific presence data of a given category name is referred to as an instance of the category. Although the data of the basic presence information types can be parsed or manipulated separately in any local processes. he or she can include Global Positioning System (GPS) coordinates and velocities in the enhanced presence state category definition by extending an existing category or by creating a custom category. In addition to the presence data. An enhanced presence category represents a named set of related presence information types. and location are three basic types of related information describing a user’s presence state. In any Lync Server deployment it is possible to use any other information to describe the presence of a contact or a presence entity. activity. published or subscribed to. as represented by the following attributes:  Category name. This flexible presence data model supported by Lync Server is known as enhanced presence. Other information that describes the contacts’ presence includes a user-supplied presence note. Identifies what type of presence data the category instance holds. a capability string that describes whether or not the contact can take instant messaging (IM) or audio/video calls. one application may include only availability to describe a presence state and another application may include both availability and activity as a presence state. The name of an enhanced presence category defines a type of presence information that can be transported between endpoints across one or more networks as an independent unit of presence data. a category instance contains metadata. they can only be transported over the wire. In some scenarios. The contract stipulates the data structure of the contained category instance value. The enhanced presence data model is flexible because an enhanced presence category can be extended to include other basic types of presence information to satisfy different application needs. whereas in other scenarios all the presence information subtypes are required to represent a presence state. For example. is less likely to respond to you. also simply referred to as category. For example. telephone numbers. Furthermore. Enhanced Presence Data Model The enhanced presence data model for Lync 2010 and Lync Server 2010 is underpinned by the concept of enhanced presence category.When a contact's status shows Available. namely. For details. contact card information that contains the office location. The XML schema of the category Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 6 . the organization chart. however. only the location information is relevant to describe a presence state. It specifies a contract between a presence provider and a presence consumer. perhaps. they form an enhanced presence category called a state. If a person wants to observe the movement of a user remotely. This means that the same type of category instances can describe different aspects of the same type of presence information in various level of detail. This contract corresponds to an XML schema. Membership determines which users can access the contained data. the instance number is used to identify a specific instance of a given category. the server uses the version numbers to maintain the most current publication across multiple endpoints. may be altered if the custom container happens to share common membership with the Blocked Contacts container. These state category instances present different information about the presence state published from a device. In the case where a client publishes the category instance from multiple endpoints. The server increments the clientprovided version number by one if the client-provided version number corresponds to the most current version number maintained by the server. where presence data originates) or the kind of category instance that contains different variations of the same type of presence information. External Contacts (container ID=100). Colleagues (container ID=200). Container ID. Version number. You can assign a custom container an ID that is any number between 0 and 32767 that is not currently used by any application. Lync Server uses a set of containers to hold the self-published category instances by the local user and other application data that are intended for private use by the local user or client. The privacy relationships defined in Lync Server are Friends and Family (container ID=400).   instance must be well formed. Every time the client updates the user’s status (for example. that identifies a container of published category instances. Instance number. a phone state. and Blocked Contacts (container ID=32000). Workgroup (container ID=300). Containers are category data stores managed by Lync Server that allow the publisher to control which users are allowed access to the data in the store. a user state. It can be used to identify the source where the presence data is published (that is. The client must present the current version number for the publication update to succeed. Lync Server does not require that the XML schema be validated. respectively. Provided by a client. Lync uses five containers to support five levels of access by remote contacts. Containers are created by Lync Server when a new container ID is specified by a Lync Server client. but contains a different set of category instance values. Each presence publisher owns a set of containers. These correspond to the five privacy levels that can be assigned to a contact when the contact is added to the local user’s Contacts list. Used by Lync Server to synchronize publications of the category instance. They include the Self container (container ID=1) and Aggregation containers (container IDs 2 and 3). each of which has a unique container ID value. however. the semantics for the Blocked Contacts container. inclusively. An application can elect to use other custom containers too. Each state category instance is assigned a different instance number. For example. Notice that if such a container is assigned a value greater than 32000. Each container is assigned a list of members or a membership scope. In any case. which is defined by Lync Server. or a calendar state. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 7 . or a calendar event. a user action. care must be taken to avoid potential conflicts. presence) a category instance is published to the server. especially when the application intends to interoperate with Lync 2010. a state category instance can be classified as a machine state. a phone call connection. A unique integer ranging between 0 and 32767. When the server receives multiple requests to update a certain publication. Specifies the time when the category instance is last published or updated. a category instance corresponds to a <publication> element as shown in the following example. Publication time. The Expiration time specifies the time when the category instance publication expires. when a category instance ceases to be in publication. the category instance metadata prescribes how the category instance is maintained and how it should be processed.  the server accepts the request from the client with the latest version number and ignores all the other update requests. Specifies how.microsoft. A static publication that does not expire. Publication continues to persist as long as one of the endpoints of the publishing user is registered. The publisher can reset the expiration time to refresh the publication. "<category xmlns="http://schemas. at which time the publication is removed. Unbounded. if applicable. Time bounded.com/2006/09/sip/categories" name="state" instance="1" publishTime="2011-04-13T04:53:03. Expire type. For this setting. when the client is not currently signed in to Lync Server). <publication categoryName="state" instance="929600355" container="3" version="13" expireType="endpoint"> <state … > … </state> </publication> In a remote subscription or query notifications where the results are received in SIP 200 OK responses or using the NOTIFY or BENOTIFY requests. you also need to specify the Expiration time. Depending on whether the category instance is published or received. Publication expires when the publishing endpoint is no longer registered (for example. User bounded. Lync Server uses an XML element to represent an enhanced category instance. You can think of these category instance attributes as the metadata of a particular piece of presence information. Publication persists until the affiliated expiration time is reached.137"> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 8 . the category instance XML element has one of the following forms:   In publications where category instances are published using a SERVICE method with the Content-Type header value of “application/msrtc-category-publish+xml”. A category instance publication can have one of the following types of life cycles: o o o o Endpoint bounded. a category instance corresponds to a <category> element as shown in the following example. with the Content-Type header value of “application/msrtc-event-categories+xml”. The category instance metadata are expressed as the attributes of the XML element and the category instance data value is expressed as a child element of the XML element. and. While a category instance data value describes the presence information. The following table lists the XML schemas for the enhanced categories used by Lync 2010.com/2006/09/sip/options/otherOptions” XSD file name: options-otherOptions. see the “Subscription” section later in this chapter.xsd rccOptions XSD namespace: “http://schemas.com/2006/09/sip/options/rccOptions” Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 9 .microsoft.com/2006/09/sip/options/alerts” XSD file name: options-Alerts. In a remote subscription or query. XML schemas of enhanced categories defined by Lync 2010 Category name Category instance data XML schemas Alerts XSD namespace: “http://schemas. the format of the actual presence information. to publish and receive presence data). <category name="state" instance="1" publishTime="2011-04-13T04:52:19.com/2006/09/sip/mwi” XSD file name: msidata. For details.  In the self-subscription notifications where the private roaming data is sent in SIP 200 OK responses or using the NOTIFY or BENOTIFY requests.microsoft. with the Content-Type header value of “application/msrtc-event-categories+xml”.com/2006/09/sip/note” XSD file name: note.com/2006/09/sip/device” XSD file name: device.com/2006/09/sip/routing” XSD file name: routing.com/2006/09/sip/calendarData” XSD file name: calendarData. In a Lync Server 2010 deployment.microsoft. the returned category instance does not contain any specifications of the container information.<state …> … </state> </category> Note. is defined by a presence application.microsoft.microsoft.microsoft. devicetypes.xsd otherOptions XSD namespace: “http://schemas.microsoft. Table 1.xsd Note XSD namespace: “http://schemas.microsoft. the data format of the enhanced presence category instance data value is prescribed by an XML schema. These XML schemas are defined by Lync 2010. contactCardTypes.xsd Mwi XSD namespace: “http://schemas.xsd contactCard XSD namespace: “http://schemas.xsd.XSD calendarData XSD namespace: “http://schemas.xsd Routing XSD namespace: “http://schemas.com/2006/09/sip/contactcard” XSD file name: contactCard.XSD.microsoft. as represented by the category instance data value. the publishing and subscribing applications must recognize the same presence data format. calendardatatypes.xsd.xsd Device XSD namespace: “http://schemas.530" container="400" version="87" expireType="user"> <state …>…</state> </category> Enhanced Category Instance Data While the formats of a category instance stipulate the data exchange protocol between Lync Server and a Lync Server client. For presence applications to interoperate with each other (that is. a category instance corresponds to a <category> element as shown in the following example. microsoft.xsd For details about presence data schemas defined in Lync Server. which is stateType as shown in the following example. statetypes.xsd State XSD namespace: “http://schemas.xsd Services XSD namespace: “http://schemas. The XSD definition for this particular presence state is shown in the following example.xsd.com/2006/09/sip/state” XSD file name: state. As an example. options.microsoft. To get the complete definition of the userState category instance data type.userState is a concrete type derived from stateType --> <xs:complexType name="userState"> <xs:complexContent> <xs:extension base="tns:stateType"> <xs:sequence> <xs:sequence minOccurs="0" maxOccurs="1"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element ref="ct:delimiter"/> <xs:any namespace="##targetNamespace" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:element ref="ct:end"/> </xs:sequence> <xs:element ref="ct:extension" minOccurs="0" maxOccurs="1"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> This example shows that the category instance data type is hierarchical. the XSD definition in the previous example extends the schema definition of stateType with the <delimiter>.xsd. see “Unified Communications Enhanced Presence Schemas for Microsoft Lync Server 2010 Documentation” on the MSDN Library website at http://go. <extension>) to the userState category instance data.com/2006/09/sip/service” XSD file name: service.com/2006/09/sip/categories” XSD file name: userProperties. <!-.xsd userProperties XSD namespace: “http://schemas.Category name Category instance data XML schemas XSD file name: options-rccOptions.microsoft. <!-. and <xs:any> extensions. In addition to the elements and attributes defined in the base type. and the application extension (that is.-UserInformationTYpes.stateType is an abstract type used as a base type for specific state --> <xs:complexType name="stateType" abstract="true"> <xs:sequence> <xs:element name="availability" type="xs:unsignedInt" minOccurs="0"/> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 10 .xsd userInformation XSD namespace: “http://schemas. we must also look at the base type definition. let us look at the user state category instance XML schema.microsoft. <end>.com/2006/09/sip/options/userInformation” XSD file name: options-UserInformation.com/fwlink/? LinkId=223572.microsoft. The userState category instance data type is derived from the abstract stateType category instance data type. <activity>.microsoft. the time that the current presence state is set. Other information types specify the version numbers.microsoft. According to the XML schema in the previous example.com/2006/09/sip/commontypes" > <[any] xmlns="any. The complete syntax of the userState category instance data value can be derived from these two XSD definitions as shown in the following example.microsoft..com/2006/09/sip/state">any element</[any]> <ct:end xmlns:ct="http://schemas. It does require that the category name be registered with the server and that the category instance data value be a well-formed XML document or fragment. These information types can be extended by using an <extension> element.microsoft. a presence state can have zero or one instance of the <availability> element containing an integer value (that is.microsoft.com/2006/09/sip/commontypes" /> <ct:extension xmlns:ct="http://schemas. and whether or not the presence is set manually.com/2006/09/sip/state" type="userState" manual="xs:boolean" startTime="xs:dateTime" majorVersion="xs:unsignedInt" minorVersion="xs:unsignedInt" [anyAttri]="anyAttribute"> <st:availability>xs:unsignedInt</st:availability> <st:activity>st:activityType</st:activity> <st:endpointLocation>st:endpointLocationEnumEx</st:endpointLocation> <st:extension>st:extensionType</st:extension> <ct:delimiter xmlns:ct="http://schemas.<xs:element name="activity" type="tns:activityType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="endpointLocation" type="tns:endpointLocationEnumEx" minOccurs="0"/> <xs:element name="extension" type="tns:extensionType" minOccurs="0" maxOccurs="1"/> </xs:sequence> <xs:attribute name="manual" type="xs:boolean" use="optional" default="false"/> <xs:attribute name="startTime" type="xs:dateTime" use="optional"/> <xs:attribute name="majorVersion" type="xs:unsignedInt" use="optional" /> <xs:attribute name="minorVersion" type="xs:unsignedInt" use="optional" /> <xs:anyAttribute processContents="lax"/> </xs:complexType> The abstract stateType data type defines the information types of the presence state <availability>. The semantics of the availability value is specific to the Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 11 .namespace">. referred to as the availability number). <st:state xmlns:st="http://schemas.. and <endpointLocation> elements.</[any]> <ct:extension> </st:state> Although the category instance data value is schematized. Lync Server does not validate any enhanced presence category instance data against its schema.com/2006/09/sip/commontypes" /> <[any] xmlns="http://schemas. application. The availability number semantics defined by Lync 2010 Availability number range Availability mode 0-2999 Undefined 3000-4999 Available 4500-5999 Available – Idle 6000-7499 Busy 7500-8999 Busy-Idle 9000-11999 Do Not Disturb 12000-17999 Be Right Back 15000-17999 Away 18000 and higher Offline In addition to the availability number. Lync uses the default activity string for the given availability number range.com/2006/09/sip/commontypes" /> <ct:extension xmlns:ct="http://schemas.com/2006/09/sip/commontypes" >. a state category instance can have an <activity> element to provide a description of what kind of activities the user is currently engaged in.. <st:activity xmlns:st="http://schemas. Table 2. This can be as simple as a locale-specific string.<ct:extension> </st:state> When the <activity> element is not specified in a state category instance. Default activity strings and their availability number range Availability number range Default activity string 0-2999 Presence unknown 3000-4999 Available 4500-5999 Inactive 6000-7499 Busy 7500-8999 Busy 9000-11999 Do Not Disturb 12000-17999 Be Right Back 15000-17999 Away 18000 and higher Offline Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 12 .microsoft. Table 3..com/2006/09/sip/commontypes" /> <[any]>any element</[any]> <ct:end xmlns:ct="http://schemas. In Lync 2010 the availability number has the semantics listed in the following table. A general description of the syntax of the <activity> element is shown in the following example.microsoft. The activity description can be expressed as a token attribute on the <activity> element or an application-defined child element of any name in any namespace.microsoft.microsoft. The following table shows all the default activity strings and their corresponding availability number range.com/2006/09/sip/state" token="st:activityTokenEnumEx" maxAvailability="st:unsignedInt" minAvailability="st:unsignedInt" [anyAttri]="anyAttribute"> <ct:delimiter xmlns:ct="http://schemas. The user may be talking on the mobile phone while typing on the laptop computer. Each endpoint can have a different manifestation of the user’s presence information. Lync ignores the non-standard token values and displays the default activity string of the current availability number. <activity token=”out-to-lunch”> <custom LCID=”1033”>Out to lunch</custom> </activity> Aggregated Category Instance Values and Multiple Points of Presence Lync Server 2010 allows a user to simultaneously sign in from multiple endpoints. and whether or not the presence entity can answer phone calls by using a mobile phone or desk phone. For some types of presence information. a laptop. Lync displays the associated activity string and ignores any custom activity strings. without the token attribute. without a custom token value. Table 4. Standard activity tokens and associated activity strings. The watcher is interested in whether the presence entity is available or can take calls regardless of the devices at his or Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 13 . In any case. used in the US-English locale. as defined by Lync Standard activity token Standard activity string in-a-meeting In a meeting in-a-conference In a conference on-the-phone In a call out-of-office Out of office urgent-interruptions-only Urgent interruptions only When a standard token is specified. When a custom activity string is used. The following example of the <activity> element shows a custom activity string. When a custom token is set without also specifying a custom activity string. a desk phone. Lync displays this activity string when no token is specified or when a custom token is used. used in the US-English locale. activity tokens are case-sensitive. leaving the desktop computer idle and the desk phone available to receive incoming calls. Most the presence watchers are not preoccupied with finding out whether or not the presence publisher is active on a laptop or desktop computer.Availability number range Default activity string Unspecified Offline The activity token attribute can be assigned a standard or custom token value. the separate endpoint-specific views of the presence are not necessary and even confusing for a remote presence watcher. Standard tokens are those defined and used by Lync and each has a well-defined activity string associated with it. The following table shows the standard activity tokens that are defined by Lync and their associated activity string. and a desktop computer. such as a mobile phone. <activity> <custom LCID=”1033”>Out to lunch</custom> </activity> The following example of the <activity> element shows a custom activity string. such as presence states and capabilities. Lync uses private containers to hold private categories. or 400. In a Lync Server 2010 deployment. Also. the Workgroup contacts will see the availability number of 6900 (Busy . It is intended for legacy clients that cannot handle enhanced presence categories. They are intended for local use by the application and the data cannot be accessed by any remote presence entities. a federated Yahoo! Messenger or Windows Live® Messenger. Private category instances contain data that is made available to a local client or a local user only. calendarState. The input includes the userState. The Lync is responsible for publishing this data and for ensuring any supported legacy clients receive it. Container 0 is also public container. the publisher may not want remote watchers to have detailed knowledge of the endpoint-specific presence publications. phoneState. Briefly. The output includes only an aggregateState category instance to be placed into container 300. 200. services. contactCard. and then outputs the aggregated states (that is. The input includes the userState. In other words. services) to containers 100. machineState.her disposal. 300. Container 2 contains the input for aggregation to produce aggregated presence information to be output into containers 100. The output includes aggregateMachineState and services category instances to be placed into containers 100. The aggregateState category instance to be placed into containers 100. The aggregation script is invoked whenever a publication of the userState. and 400. Furthermore. The two aggregation containers imply that different aggregation logic is at play.com/fwlink/?LinkId=223573. which include aggregateState. Container 3 contains the input for aggregation to produce the aggregated result to be output into container 300. This situation is known as multiple points of presence (MPOP). and 400. calendarState. or deleted from containers 2 or 3. see the “[MS-PRES]: Presence Protocol Specification” in the MSDN Library at http://go. the aggregation script aggregates the presence state. The reason behind such different behaviors is to support the case when a user manually sets the availability number in the range between 9000 and 11999 (Do Not Disturb). The aggregation results are represented by aggregated category instances. phoneState. and services. For a detailed design of the aggregation logic. The private containers include the Self container (container ID 1) and the Aggregation containers (container IDs 2 and 3). 200.Urgent interruptions only) instead and calls made by a Workgroup contact to the publisher will not be blocked as is the case for other contacts who are shown the “Do Not Disturb” activity string and whose calls will be blocked. note. The private categories include alerts. location. In Lync. phoneState. machineState. One requirement to support MPOP is to enable aggregation of disparate endpoint-specific presence information into a single view of the effective presence data value that is user specific and not endpoint dependent. and dndState category instances. container 3 is used to produce the aggregateState category instance specifically for the Workgroup (container 300) contacts (as specified as members of container 3) and container 2 is used to perform all other applicable aggregation. Public and Private Category Instances Public category instances contain presence information that can be made available for access by anyone. calendarState. public category instances include calendardData. 200. 300 and 400. a special category named legacyInterop is published in these containers. aggregateMachineState. otherOptions. and 400. 200. 200. and state and are published to containers 100. 300. 300. For example. the aggregation is supported via a serverhosted aggregation script that implements predefined aggregation logic. aggregateState and aggregateMachineState) and the aggregated presence capabilities (that is. and the device capabilities of the presence entity. The aggregation takes the input from containers 2 and 3. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 14 .microsoft. noteHistory. machineState. provided that the consumer has been granted permission. device and dndState category instances. or device category instance is added to. updated in. Custom clients can define application-specific categories to represent any application data it deems necessary. you can call the following Microsoft SQL Server® commands against the SQL Server database used by Lync Server 2010: use rtc exec RtcRegisterCategoryDef N'aCategoryName' You can use SQL Server Management Studio to run this command. a presence publisher makes his or her presence available to other users by publishing the presence category instances. In fact. you must be a Lync Server 2010 administrator. the name of the category must be registered with Lync Server 2010. Lync also publishes some private categories to the public containers. Instead. To register a category name. where rtc refers to the SQL Server database name. adding container members. the custom categories must be registered with Lync Server before they can be published or subscribed to. These include dndState and routing categories. However. To synchronize the access controls among different endpoints. and aCategoryName is the name of the category to be registered. The publication amounts to specifying one or more containers. RtcRegisterCategoryDef is the name of a stored procedure. Lync publishes the access control lists (ACLs) as a set of private category instances of the containers name that are identified by the container IDs and contain specified membership descriptions. Before a category can be used in publication or subscription. including custom presence data. userInformation. These publications enact routing rules to forward incoming calls made by a member of the container. mwi. the enhanced presence category data model is flexible and can be extended to express custom presence information or can be generalized to represent any application data. Lync Server mediates the exchange between the two by delivering presence category instances published in a container on the server to the registered subscribers matching the membership scope of the same container. and userProperties categories. Custom categories are ignored when they are not recognized by other applications. The first service coordinates publications of category instances and the second one facilitates subscriptions to category instances published by specified presence entities. Remote presence entities can subscribe to private categories. such a generalization can be seen in Lync in its representation of the containers as an enhanced presence category. the server responds to the Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 15 . Whenever containers are created or modified. In the case of a query where the requesting user is not a registered subscriber. Publication In Lync. Categories for Application Data and Custom Presence Based on XML. To run the commands. Lync receives the published container categories in the self-subscription. and placing category instances holding presence data through a SIP request. Enhanced Presence Operations The Lync Server 2010 enhanced presence system provides two basic services to support presence applications that use the enhanced presence data model. but will not receive any of the category data.rccOptions. Subscription also includes querying published category instances. Presence publication does not involve direct exchanges between the presence publisher and the presence subscriber. For a new category instance. a standard activity token and a custom activity string. container ID.au dio.epid=1E5C4E59CA CSEQ: 5 SERVICE CALL-ID: 138afca10c4446f5a063925138cd4f26 MAX-FORWARDS: 70 VIA: SIP/2. When the request is accepted by the server. and the actual presence data.0. the time of the publication.crand="70bd108c".opaque=user:epid:sCPKlagTB1apRfve3oHuPQAA.com SIP/2. SERVICE sip:bobkelly@contoso. For a new category instance (that is.gruu>. The category instances are included as the payload of the SIP message.155:53594. assigns a version number of 0. For each category instance.qop="auth" CONTACT: <sip:[email protected] CONTENT-LENGTH: 609 SUPPORTED: gruu-10 USER-AGENT: RTCC/4. If it does exist. Upon receiving the publication request.response="0100000000000000dec685fc58268760".opaque="17FC1F24". it doesn’t exist). Publishing Presences Using SIP SERVICE Requests Publishing presence information as one or more category instances involves sending a SIP request of the SERVICE method from the publisher to the Lync Server.epid=1E5C4E59CA. The Lync Server expects the subscribing client to compare the category instances in a notification with those currently maintained by the client. Notice that this roaming data is also returned to the publisher in a subsequent NOTIFY request issued by the server as part of the self-subscription. the server verifies whether the client-supplied version number is greater than the number on the server or whether the last publication time is earlier than the client-specified publish time.video. of the new or updated category instances. and remove them from the local cache.0 PresPub CONTENT-TYPE: application/msrtc-category-publish+xml Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 16 . the server updates the publication on the Lync Server and increment the servermaintained version number by one. version number. the deleted category instances are excluded from the notification.0.client request to return the requested publication. a SIP response of the 200 OK class is returned to the requesting client with updated category instances included as the roaming data. instance ID. the server instantiates the category.0 FROM: <sip:[email protected]=0153ea48 TO: <sip:bobkelly@contoso. who are members of a container. the publisher sets the version number to 0.cn um="6". mark the missing category instances as deleted ones.text.contoso.com. The following is an example of the SIP SERVICE request used to publish a userState category instance to container 2 by an application named PresPub.branch=z9hG4bK96be304f AUTHORIZATION: NTLM realm="SIP Communications Service". The user state is described by an availability number (3500).com>. the publisher specifies the category name.com". the server notifies the registered subscribers. For an existing category instance.0/TLS 192. and places the instance in the specified container.168.0.com>.targetname="tuk-ocdr101. expiry type. When an update results in a deletion of a category instance from the publication. the server determines whether the specified category instance is a new or existing. After accepting a publication request. provided that the requesting user is a member of the container. the applicable expiration time. 0.w3.155:53594.org/2001/XMLSchema" xsi:type="userState" xmlns="http://schemas.w3.168.com/2006/09/sip/categories" uri="sip:[email protected]=0153ea48 TO: <sip:[email protected]/2006/09/sip/state"> <availability>3500</availability> <activity token="in-a-meeting"> <custom LCID="1033">Some activity</custom> </activity> </state> </publication> </publications> </publish> The following is the server response of SIP 200 OK to the SERVICE request in the previous example. srand="CFCC1A9B". realm="SIP Communications Service" ms-user-logon-data: RemoteUser <roamingData xmlns="http://schemas. opaque="17FC1F24".microsoft. snum="6".121.w3.tag=A159FEC7C342936628C5CEDC7D11E 057 CSEQ: 5 SERVICE CALL-ID: 138afca10c4446f5a063925138cd4f26 VIA: SIP/2. which can be identified by the corresponding CSEQ and CALL-ID headers.microsoft.org/2001/XMLSchema-instance" xmlns:xsd="http://www.org/2001/XMLSchemainstance" xmlns="http://schemas. qop="auth".ms-received-cid=22E61D00 CONTENT-LENGTH: 5816 CONTENT-TYPE: application/vnd-microsoft-roaming-self+xml AUTHENTICATION-INFO: NTLM rspauth="01000000000000002C72615B58268760". The response includes the affected the category instances as a result of the publication request.0 200 OK FROM: "Bob"<sip:[email protected]. SIP/2.com/2006/09/sip/state"> <availability>3500</availability> <activity token="in-a-meeting"> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 17 .com>.0/TLS 192.com>. targetname="tuk-ocdr101.com/2006/09/sip/roaming-self" xmlns:cat="http://schemas.173.microsoft.<publish xmlns="http://schemas.397" container="2" version="23" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.com"> <category name="state" instance="1" publishTime="2011-04-26T17:37:15.branch=z9hG4bK96be304f.ms-receivedport=53594.74.com"> <publication categoryName="state" instance="536870912" container="2" version="3" expireType="user"> <state xmlns:xsi="http://www.microsoft.received=76.com".microsoft.epid=1E5C4E59CA.epid=1E5C4E59CA.com/2006/09/sip/categories"> <categories xmlns="http://schemas.com/2006/09/sip/rich-presence"> <publications uri="sip:bobkelly@contoso. microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.com/2006/09/sip/commontypes"></end> </state> </category> <category name="state" instance="1002993682" publishTime="2011-0425T16:34:31.<custom LCID="1033" xmlns="http://schemas.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>3500</availability> <delimiter xmlns="http://schemas.607" container="2" version="1" expireType="endpoint" endpointId="458D2A22-9EC7-5D55B011-F8E31CFE459E"> <state xmlns="http://schemas.com/2006/09/sip/commontypes" /> </state> </category> <category name="state" instance="268435456" publishTime="2011-0426T16:19:31.microsoft.w3.microsoft.microsoft.397" container="2" version="1" expireType="endpoint" endpointId="FB00E3D8-689A-53C58F6F-B678A337E1A4"> <state xmlns="http://schemas.microsoft.microsoft.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.397" container="2" version="35" expireType="user"> <state xsi:type="aggregateMachineState" endpointId="fb00e3d8-689a-53c5-8f6fb678a337e1a4" xmlns:xsi="http://www.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>15500</availability> <delimiter xmlns="http://schemas.com/2006/09/sip/state" xmlns:xsi="http://www.com/2006/09/sip/commontypes" /> <timeZoneBias>420</timeZoneBias><timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"></delimiter> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas.com/2006/09/sip/state"> <availability>3500</availability> </state> </category> <category name="state" instance="876227841" publishTime="2011-0426T16:19:31.com/2006/09/sip/state">Some activity</custom> </activity> <delimiter xmlns="http://schemas.com/2006/09/sip/commontypes"></delimiter> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>deskphone</device> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 18 .w3.microsoft. 397" container="100" version="23" expireType="user"> <legacyInterop availability="3500" /> </category> <category name="state" instance="1" publishTime="2011-04-26T17:37:15.com/2006/09/sip/state" xsi:type="userState"> <activity token="in-a-meeting"> <custom LCID="1033">Some activity</custom> </activity> </state> </category> <category name="state" instance="1" publishTime="2011-04-26T17:37:15.w3.microsoft.com/2006/09/sip/state">Some activity</custom> </activity> <delimiter xmlns="http://schemas.microsoft.org/2001/XMLSchema-instance" xmlns:xsd="http://www.com/2006/09/sip/commontypes"></end> </state> </category> <category name="state" instance="536870912" publishTime="2011-0426T17:37:15.397" container="100" version="23" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.com/2006/09/sip/commontypes" /> </state> </category> <category name="legacyInterop" instance="1" publishTime="2011-0426T17:37:15.<end xmlns="http://schemas.w3.microsoft.com/2006/09/sip/commontypes" /> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.397" container="200" version="23" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www.microsoft.397" container="200" version="23" expireType="user"> <legacyInterop availability="3500" token="in-a-meeting" /> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 19 .w3.microsoft.microsoft.397" container="2" version="4" expireType="static"> <state xmlns:xsi="http://www.org/2001/XMLSchema-instance" xmlns="http://schemas.com/2006/09/sip/state"> <availability>3500</availability> </state> </category> <category name="legacyInterop" instance="1" publishTime="2011-0426T17:37:15.org/2001/XMLSchema" xmlns="http://schemas.com/2006/09/sip/state"> <availability>3500</availability> <activity token="in-a-meeting"> <custom LCID="1033" xmlns="http://schemas.w3. It can be inferred from the results that the local user had two devices online. In this example. 200 and 400.com/2006/09/sip/state"> <availability>3500</availability> <activity token="in-a-meeting"> <custom LCID="1033" xmlns="http://schemas.microsoft. and legacyInterop category instances in container 2 and output aggregateState and legacyInterop to containers 100. One is a computer and the other is a desk phone. see the “Enforcing Interoperability with Lync by Using Publication Grammars” section later in this chapter.397" container="400" version="23" expireType="user"> <legacyInterop availability="3500" token="in-a-meeting" /> </category> </categories> </roamingData> The results include all the state category instances affected by the publication request due to the aggregation.com/2006/09/sip/state">Some activity</custom> </activity><delimiter xmlns="http://schemas. and legacyInterop category instances in containers 2.microsoft.w3. 100. aggregateMachineState.microsoft. Lync publishes a userState category instance using a SIP SERVICE request when the user selects a new availability mode (also known as presence status) in Lync. For details about grammar-based and grammar-free publications. The aggregation script generates the updated aggregateState. there were no phone calls or meetings taking place at the time of the publication.com/2006/09/sip/commontypes" /> </state> </category> <category name="legacyInterop" instance="1" publishTime="2011-0426T17:37:15.microsoft. Thus.org/2001/XMLSchemainstance" xmlns="http://schemas. machineState. only the userState and machineState instances were used by the aggregation script. Publishing a user state into container 2 causes the aggregation script to run. 200 and 400. as illustrated in the following figure.com/2006/09/sip/commontypes" /> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 20 . aggregateState.</category> <category name="state" instance="1" publishTime="2011-04-26T17:37:15. This publication is an example of the grammar-free publication where the Lync Server honors the client specifications of the category name. instance ID and container Id. Note. As the result the local user gets notified of the roaming data of the userState.397" container="400" version="23" expireType="user"> <state xsi:type="aggregateState" xmlns:xsi="http://www. aggregateMachineState. being inactive can cause an Inactivity or Away status). meaning that its value can be set manually by the user. The four main categories of contributors to state in aggregation Presence source Description Machine state An endpoint state that describes activity information from a device (for example. Availability options in Lync 2010 Other than aggregated categories. The following table summarizes the four endpoint-dependent state categories that are used as input to the aggregation script. Do Not Disturb). a computer or a mobile phone with Microsoft Office Communicator Mobile) expressed as a value indicating ”idle. Table 5.” User state Describes a user status that is set manually by the user (for example. calendarState. For the state categories. they include userState. machineState. and endpoint-independent. and phoneState categories are not manual. Lync designates userState as a manual category. They are automatically published when. Understanding Lync Server Presence Aggregation Lync Server supports aggregation for presence state and presence capabilities. a device status changes between active and inactive.Figure 2. presence capabilities and availability of the user. or that is automatically set by expiration timers that are triggered by user actions (for example. It applies to the state and device categories only. and calendarState. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 21 . all the enhanced presence categories are published by using the SIP SERVICE request.” ”away. whereas the machineState. The aggregation script takes the endpoint-dependent device and presence state category instances as input and produces a services and aggregateState categories as output to describe the overall. respectively.” ”locked. and a scheduled meeting begins. phoneState. a phone call is connected. a userState category instance can have one of the following availability modes. The Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 22 . Away 15500 NULL Device has not been used in a period of time based on user configurable time value for minutes expired since state has changed to ”Inactive. The userState category describes the availability modes of a user. When the user selects Available. User state types and integers assigned to the state Availability mode Availability number Activity token Description Available 3500 Busy 6500 Do Not Disturb 9500 User should not be interrupted. Appear Away. Lync publishes a static userState category instance containing the selected availability mode to containers 2 and 3. Lync publishes a userState instance containing the chosen availability number and the appropriate activity token. Off Work 15500 User is in the available state. For example. Lync uses the following availability modes to describe a machine state.” Offline 18500 NULL User is not active and is not logged on. Lync publishes a userState category instance as a time-bounded instance that will expire in 24hrs (or 86. Manually set by the user and is a custom state. The corresponding instance ID is 0x20000000. a machineState category instance is derived from a state of the corresponding device. urgent-interruptions-only (in container 3) off-work User is in the busy state. Outlook) A machineState category instance describes the availability status of a device on which Lync runs. if applicable. It is not a manual category and cannot be set by the Lync user manually. In Lync. Table 7. typing on desktop) while leaving another device logged on. When the user chooses Busy or Do Not Disturb. Appear Away 15500 Manually set by the user to look to other users as if they are in an Away state. a user is active on one device (for example. Machine state types and integers assigned to the state Machine State Type Availability Activity Description Active (Busy) 3500 NULL Machine is in use. There are fewer availability modes for a machineState instance. In other words. or Off Work from the Lync main window. Be Right Back 12500 User is not currently available. Table 6.400 seconds) if the userState’s availability is not reset by the user before then.Phone state Describes events based on the current activity of the phone device that a user is registered on (for example. Be Right Back. When a Lync user selects an entry from the availability menu in the Lync main window. but unattended. In a Call or In a Conference) Calendar state Based on information about items in a presence-aware calendar (for example. Lync defines userState as a manual category that can be set by the user. but user is still logged on. A user state is endpointdependent. Detected by keyboard or mouse input when user is logged on. Inactive 3750 Inactive Device has not been used in the last user-defined number of minutes. Lync publishes a machineState category instance whenever the device status changes as the result of user activity or inactivity. When the Lync user manually sets their availability as “Appear Away”. Lync publishes a machineState category instance containing the availability number of 15500 to containers 2 and 3. These are three distinct presence states that are assigned the same availability number of 15500. When aggregated. This means that the Away status persists in the aggregateState Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 23 . a user’s overall presence. the userState publication remains unchanged until the user resets it manually. Lync publishes a static userState category instance to containers 2 and 3.org/2001/XMLSchema-instance" manual="true" xsi:type="userState"> <availability>15500</availability> </state> In response to this publication. the aggregation script updates the aggregateState instance to reflect the new user setting.com/2006/09/sip/commontypes" /> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas. as shown in the following example. Lync publishes the userState instance in both containers 2 and 3. Appear Away. and. The user gets the notifications of incoming calls from any contacts with the necessary permission.org/2001/XMLSchema-instance" xmlns="http://schemas. If Do Not Disturb is selected. places another userState instance containing the activity number of 6500 and the activity token of urgent-interruptions-only.microsoft. This causes the aggregation script to create an aggregateState category instance containing the same availability number.com/2006/09/sip/state"> <availability>15500</availability> <delimiter xmlns="http://schemas. It reflects the three different ways of showing that the user is away. As a result. The resulting aggregateState category instance is user-bounded and has an instance ID of 1. the user’s presence icon changes to yellow and the displayed activity string shows the default activity string as “Away”. in container 3. Lync places a userState instance containing the availability number of 9500 in container 2.microsoft. which is configurable using the Lync Options button. incoming calls ring first before being forwarded to voice mail when the call is not answered.com/2006/09/sip/state" xmlns:xsi="http://www.com/2006/09/sip/commontypes" /> </state> As a result. and Off Work. which is derived from the availability number 15500. In this state. The “Away” status changes automatically when user activity is detected. the user’s presence state is described by the default activity string of “Away”.w3.w3. As a static category instance. <state xmlns="http://schemas.microsoft.microsoft. as shown in the following example.     When the Lync user has stopped interacting with all the devices that are running Lync for some time. <state xsi:type="aggregateState" lastActive="2011-04-28T22:38:26" xmlns:xsi="http://www. If Busy is chosen. can be Away.instance ID of the time-bounded userState category instance is 0x24000000. as described by aggregateState. com/2006/09/sip/state" xmlns:xsi="http://www.w3. until the user manually changes the status.org/2001/XMLSchema-instance" manual="false" xsi:type="phoneState"> <availability>6500</availability> <activity token="on-the-phone" Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 24 . until the user manually changes the status. Phone state presence values based on current user activity on the phone device Phone state type Availability Activity token Description In a one-on-one conversation 6500 on-the-phone User is speaking with one person. Table 8.microsoft. the user will not be notified of any incoming phone calls because they are automatically routed to voice mail. <state xmlns="http://schemas. making the user presence appear “Off work”.com/2006/09/sip/state" xmlns:xsi="http://www. In a multiparty conversation 7000 in-a-conference User is speaking with more than one person. This implies that this Away state persists in the aggregateState category instance. no matter what other activities are undertaken by the user. the aggregation script updates the aggregateState instance with the availability number of 15500 and activity token of off-work. no matter what other activities are undertaken by the user. which can be a one-on-one conversation or a multiparty conference call.  category instance. The following example shows a phoneState category instance when a two-party audio call is in place. Lync publishes a phoneState category instance when the user is in a call.org/2001/XMLSchema-instance" manual="true" xsi:type="userState"> <availability>15500</availability> <activity token="off-work" minAvailability="15000" axAvailability="17999"> <custom LCID="1033">Off work</custom> </activity> </state> In response to this publication. the user’s presence icon changes to yellow in the Lync main window and the associated activity string reads “Off work”. In this Away state.microsoft.w3. All other users think that the user is not active and unavailable. When the Lync user selects the Off Work entry from the Availability menu. The Appear Away and Off Work modes are sometimes referred to as “lurker modes” because the user can set these states and continue to be aware of everyone else’s status around him or her. As a result. making the user presence appear as “Away”. Lync publishes a static userState category instance as shown in the following example. This userState publication remains unchanged until the user resets it explicitly. <state xmlns="http://schemas. The availability numbers and the corresponding activity tokens are shown in the following table. <state xmlns="http://schemas.com/2006/09/sip/state" xmlns:xsi="http://www. While the call is in progress. 6500) and activity token (that is. on-the-phone) derived from the input phoneState instance.org/2001/XMLSchema-instance" manual="false" xsi:type="phoneState"> <availability>7000</availability> <activity token="in-a-conference" minAvailability="7000" maxAvailability="8999"> </activity> </state> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 25 . Lync publishes a phoneState category instance as shown in the following example. these availability numbers and activity token are reflected in aggregateState and the standard activity string of “In a call” is displayed to show the user’s activity status.minAvailability="6500" maxAvailability="8999" /> </state> Publication of this category instance causes the aggregation script to run and. in turn.microsoft. For a multiparty conference call.w3. to publish an aggregateState category instance containing the availability number (that is. microsoft. It also indicates that Bob’s possible user states can be Busy to IdleBusy. sip:bobkelly@contoso. Calendar states are derived from a presence-aware calendar Calendar state type Availability Activity token Description Free 3500 NULL User has no scheduled meetings Tentative 3500 NULL User has a not-yet accepted meeting In a meeting 6500 in-a-meeting User has an accepted meeting Out of Office 3500 out-of-office User is not in the office The following example shows a calendarState published by Lync when the calendar of a user (that is. This default update frequency can be adjusted via a policy implemented by the Lync Server administrator. one describes the working hours and the other describes a consecutive period of free/busy timeslots. <state xmlns="http://schemas. as shown in the following table. You can define container membership by specifying one or more SIP URIs (for example.w3. Controlling Access to Presence Publications with Containers A presence publisher uses a set of containers to control who can receive which presence data. When this meeting time occurs. Bob’s presence state will be changed to “In a meeting”. Lync publishes a calendarState category instance using the user’s calendar data that is obtained from Microsoft Exchange Server. which both fall into the range of minAvailability to maxAvailability. the standard activity string of “In a conference call” is displayed to show the user’s activity status. There are four options for a user’s calendar state. The membership of a container defines who will be notified of any new or updated publications and the category instances contained in that container specify what presence data the container members receive. as there is for most states.The aggregation script takes this as input and produces an aggregateState instance containing the same availability numbers and the activity token.org/2001/XMLSchema-instance" xsi:type="calendarState"> <availability>6500</availability> <activity token="in-a-meeting" minAvailability="6500" maxAvailability="8999" /> <endpointLocation> </endpointLocation> <meetingSubject>Project Update and status meeting</meetingSubject> <meetingLocation>Online – I’ll forward invite</meetingLocation> </state> The calendarState item in the previous example shows that Bob has a meeting in his calendar for a Project meeting and status update. bobkelly@contoso. Note that there is a maximum value for this state. The free/busy information is used to determine a calendarState instance.com) indicates a meeting in progress. Table 9. Lync maintains 4 days of free/busy timeslots and polls Microsoft Exchange to update the free/busy information every 15 minutes.com/2006/09/sip/state" manual="false" uri="[email protected]) for individual users or presentities. There are two kinds of calendar information. Again. indicated by the value 6500. Any value between the minAvailability and the maxAvailability are within the defined range for “in a meeting”.com" startTime="2010-07-01T23:30:00Z" xmlns:xsi="http://www. one or more fully qualified Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 26 . Default containers used in Lync Server 2010 (including system use containers) Container name Container ID Description of container Default 0 The container has everyone as its default membership. If a contact is a member of any network with an established federation with a Lync Server 2010 deployment. External Contacts 100 This container has a federated membership scope. Note that there is no requirement for same pool. 200. Includes all External contacts acquired through public internet connectivity. business address. The membership specification is also known as the container semantics. The data includes the user’s Contacts list. including MSN® network of internet services. The aggregated presence state for members of containers 100. and 400. they are automatically a member of this group. or sameEnterprise membership groups. Aggregation 2 3 This container does not have any explicit membership definition. and Yahoo! The contact is recognized as a publicCloud member by network of origin and a nonenterprise SIP domain sameEnterprise. Colleagues 200 This container has an explicit membership specification of sameEnterprise. but a member of a federated association. the server configurations or group policies). Contact is recognized as federated by the network of origin and is not a SIP domain of the organization. Aggregation 1 2 This container does not have any explicit membership definition. as described in the following table. federated. It is used to contain category instances intended for the users within the organization. It is used to contain the input to the aggregation script to produce the following: 1.SIP domain names (for example. or one of the following special membership scopes:    publicCloud. Table 10. The endpoint-independent presence capabilities and location for all of the contacts. AOL. contoso. where an availability value between 900011999 (Do Not Disturb). It allows a federated user to access the public category instances contained in this container. or does not belong to the federated. It is used to contain the input to the aggregation script to produce the aggregated presence state for members of container 300. and application settings (for example. With a distinct membership specification. the contact is considered a member of the Default container. A Lync Server 2010 deployment comes with a suite of standard containers with the default membership specifications. If a contact is a member of a Lync Server 2010 deployment. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 27 . the contact will be a member of this group. the user’s own contact information such as the professional title. It is accessible by the server and a local client. publicCloud. If a contact is not assigned to any other container. The contact can receive public category instances published to this container. 2. but must be from a recognized SIP domain of the organization. It is accessible by the server and a local client. will be rendered as 6500 (Busy). A local instance of a presence application uses this container to store data needed by the application. Self 1 This container does not have any explicit membership definition. It is maintained for the use by the logged on user only. or telephone numbers. a container describes an access level reflecting a specific relationship between the container owner and the container members.com) for anyone in the specified networks. or sameEnterprise) to this container. publicCloud. the user will be blocked from seeing any of the owner’s presence information.com) or membership scopes (that is. Also.com). This rule ensures that the Workgroup contacts always see the presence data in the Workgroup container. federated. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 28 . but only show the work phone number in the contactCard instance for the other contacts. state. domain names (for example. such potential conflicts are resolved by the rule that data contained in the higher numbered container will be made available to a contact who is members of multiple containers. The local user assigns another user to his or her Workgroup by adding their SIP URIs to the container. Lync publishes the availability number of 15500 (that is. The situation presents a potential conflict as to which container (and the category instances contained therein) should be made available to the contact. With the containers (or the container semantics) defined. It is possible that a member in one container may be also a member of another container. Lync uses this container to specify empty category instances for calendarData. The local user can add specific SIP URIs (sip:[email protected] name Container ID Description of container Workgroup 300 This container does not have any default membership specification. In Lync Server 2010. if a user is a member of both the Colleagues and Blocked Contacts containers. aggregateState and legacyInterop) to this container to make sure that the local user appears Offline to the blocked contacts. The following diagram shows more examples of how containers are used to publish different presence data for different contacts and how containers are resolved when a contact is a member of multiple containers. any Workgroup contact is also a Colleagues contact or a SIP URI is assigned multiple times to different containers. services. The local user assigns other users as his or her Friends and Family contacts by adding their SIP URIs to this container. a publishing client can publish different category instances of the same category name to different containers. contoso. contactCard (other than the user identity). It also places a Block routing category instance to explicit block incoming calls from any of the specified blocked contacts. including the blocked contacts. and note to ensure that the information cannot be discerned by the specified members. This allows the local user to let different contacts see different parts of his or her presence information. Another example would involve publishing a personal note containing the emergency contact information for the Workgroup and Family and Friends contacts while leaving out that information for all the other contacts. For example. It is used to contain the presence information intended for the contacts that are designated by the local user as his or her personal contacts. not the data in the Colleagues container. the local user can include the home phone number in a contactCard instance for the Family and Friends contacts. Blocked Contacts 32000 The default membership specification for this container is publicCloud. For example. It is used to contain the presence information intended for the contacts that are designated by the local user as his or her team members. contactCard of instance ID 0) available to the blocked container members so that the local user can be queried by anyone in the network. Lync also specifies the local user’s identity as the only contact information (that is. Friends and Family 400 This container does not have any default membership specification. except for the owner’s identity. Containers with published category data (resolved from highest container number to lowest) Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 29 .Figure 3. the search stops and the published category data is used. Friends and Family). If there is no match. If a group or contact SIP URI is found in container 32000 (that is. Status. 4. If a contact is found in container 400 (that is. a local user can view the access levels of his or her contacts by choosing the Relationship view in the Lync main window. until a match is made. 2. container 0 (that is. the search stops and the contained category data is used. Blocked Contacts). Member search begins at the highest numbered container and continues through to the lowest. Figure 4. 5. In Lync. Colleagues) OR if the subscriber is a member of the sameEnterprise group. Default) is used. the search stops and the contained category data is used. the search stops and the published category data is used. Workgroup). If a contact is found in container 300 (that is.To summarize. Group. 3. The resolution logic works as follows: 1. 6. containers function like an access control list (ACL) and the container ID number serves to resolve which ACL is used when multiple ACLs are present. and Relationship are three possible contact views Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 30 . as shown in the following figure. The contained category data is used. If a contact is found in container 200 (that is. and 400. In this mode. when a note category instance is published or updated according to the publication grammar defined by Lync. For different presence applications. and how a particular presence category is published to certain containers. They can also extend the default categories in their own ways or create custom presence categories to satisfy their own needs. Lync Server 2010 also supports grammarfree publications by a presence application. 300. Enabling Enhanced Privacy Mode in Presence Publications Lync 2010 defines two publication grammars for presence publications. the Lync Server follows the grammar rules to place the new note data into containers 200. this presents a conflict with Lync and such interference could cause Lync or other presence applications to behave unexpectedly. When multiple types of presence applications operate independently. Lync Server also places an empty note category instance in containers 100 and 32000.Enforcing Interoperability with Lync by Using Publication Grammars In general. Obviously. you must use a grammar-free publication. how the memberships are assigned to the containers. an application can use a publication grammar to inform other applications of its publication logic and the other applications should follow the publication grammar to ensure that the same publication rules are adhered to. presence is specific to the application. The standard privacy mode is enabled as the default or as-deployed mode. the publisher is required to specify the category name and the category data. Lync provides the user with the following options to determine how the user’s presence data is displayed:   I want everyone to be able to see my presence regardless of system settings (override default settings) I want the system administrator to decide–currently everyone can see my presence but this could change in the future Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 31 . As a presence application. In contrast. no presence data should be made available in the enhanced privacy mode. By default. Lync defines the default enhanced presence categories supported by Lync Server 2010. To make the new note data available to the members of container 100. In any case. without any user intervention. which describes the presence data structure in a set of XML schemas for enhanced presence categories and provides the publication grammars via in-band provisioning from the Lync Server. the publication rules of different presence applications may collide. The specification of a container ID is ignored. all non-blocked users can view the local user’s presence and availability. a set of default category instances are published. A publication grammar prescribes a set of publication rules that declare what containers are used. One set of publication grammars is used in the standard privacy mode and the other is used in the enhanced privacy mode. Other presence applications can use such categories by following the syntax and semantics stipulated by Lync. To avoid such conflicts. the same presence data might serve different purposes or have different representations. in the standard privacy mode of the presence publications. For example. In the standard privacy mode. a presence application running in a Lync Server 2010 deployment must be aware of the presence data structure defined by Lync and how they are published if it is to interoperate smoothly with Lync. the publication grammar specifies the container semantics only and the user must explicitly specify what presence data should be published. In the enhanced privacy mode. In a presence publication following the publication grammar defined by Lync. Client version control works by reading the SIP messages from a client. see “Client Administration” available for download from the Microsoft Download Center at http://go. Piping the result of Get-CsPrivacyConfiguration into Set-CsPrivacyConfiguration with the EnablePrivacyMode parameter enables Enhanced Privacy for all client policies configured. For details about client version control. Figure 6. Figure 5. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 32 . Set-CsPrivacyConfiguration enables Enhanced privacy. as shown in the following figure. The user can set the option by using the Status page in the Lync Options window. as shown in the following figure. Each client posts a user agent string in the SIP message. can help to limit the impact of clients that cannot consume presence in an organization where enhanced privacy mode has been set.microsoft. Status options with the standard privacy mode selected The enhanced privacy mode is enabled by the Lync Server administrator using the following Windows PowerShell® command line interface cmdlet: Get-CsPrivacyConfiguration | Set-CsPrivacyConfiguration –EnablePrivacyMode $True The following figure shows the output of this Windows PowerShell cmdlet.The user can set this option on the Status page in Lync. which dictates what client versions can log on to Lync Server 2010. Lync provides the user with two new options to decide how to display his or her presence data. and then grants or blocks the ability of a client to log on based on the information in the policy. After enhanced privacy mode is enabled. Client version control.com/fwlink/?LinkId=211003. but warns you of the potential side effects with client versions Note. Client version control reads the user agent string. The Windows PowerShell command in the previous figure performs a global configuration of privacy. Lync receives the following presence policy when the user signs in. <provisionGroup name="presencePolicyV2" > <propertyEntryList > <property name="EnablePrivacyMode" >false</property> <property name="AutoInitiateContacts" >true</property> <property name="PublishLocationDataDefault" >true</property> <property name="DisplayPublishedPhotoDefault" >true</property> <property name="PersonalNoteHistoryDepth" >3</property> <property name="SubscribeToCollapsedDG" >true</property> </propertyEntryList> </provisionGroup> When the enhanced privacy mode is enabled. the user’s contacts. The transition does not happen immediately because background work to move the current settings into the new XML schema requires some time. The first option lets the user opt out of the enhanced privacy mode and revert to the standard privacy mode. bobkelly@contoso. <provisionGroup name="presencePolicyV2" > <propertyEntryList > <property name="EnablePrivacyMode" >true</property> <property name="AutoInitiateContacts" >true</property> <property name="PublishLocationDataDefault" >true</property> <property name="DisplayPublishedPhotoDefault" >true</property> <property name="PersonalNoteHistoryDepth" >3</property> <property name="SubscribeToCollapsedDG" >true</property> </propertyEntryList> </provisionGroup> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 33 . Lync receives the following presence policy when the user signs in. and subscriptions are migrated to enhanced privacy settings. containers. When a user switches from the standard privacy mode to the enhanced presence mode. To illustrate the workflow of the transition. let’s look at an example that follows a user (for example.com) switching from the standard privacy mode to enhanced presence mode. Enhanced privacy mode set by administrative policy You may need to sign out and then sign in again to see the new options after the enhanced privacy mode is turned on.Figure 7. The second option enables the user to opt in to the enhanced privacy mode. When the standard privacy mode is enabled. com"> <publication categoryName="otherOptions" instance="2" container="1" version="7" expireType="static"> <otherOptions xmlns="http://schemas. Following is an example of this SIP message.microsoft.microsoft. Lync publishes an otherOptions category instance containing the new privacy mode selection and the existing privacy mode settings. any existing membership groups (that is. Lync publishes the otherOptions category instance containing migrattingToPrivacy as the value of the <currentPrivacyMode> element. <publish xmlns="http://schemas.microsoft. and the access control entries on the containers need to be changed.0 Via: SIP/2. The instance ID of this category instance is 2 and the publication is targeted to container 1. SERVICE sip:[email protected]/2006/09/sip/rich-presence"> <publications uri="sip:bobkelly@contoso. federated.0/TLS 192. This communicates that migration is underway to the new enhanced privacy mode.com/2006/09/sip/options/otherOptions"> <privacyModeUserSelection>private</privacyModeUserSelection> <currentPrivacyMode>standard</currentPrivacyMode> <lastQueryPrivacyEnabled>true</lastQueryPrivacyEnabled> <publishActivityHistory>true</publishActivityHistory> </otherOptions> </publication> </publications> </publish> While in the process of migrating from the standard privacy mode to the enhanced privacy mode. and sameEnterprise) need to be removed.168. publicCloud. including the following: containers and their membership specifications must be readjusted.40:65000 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 34 . <publish xmlns="http://schemas.com/2006/09/sip/options/otherOptions"> <privacyModeUserSelection>private</privacyModeUserSelection> <currentPrivacyMode>migratingToPrivacy</currentPrivacyMode> <lastQueryPrivacyEnabled>true</lastQueryPrivacyEnabled> <publishActivityHistory>true</publishActivityHistory> </otherOptions> </publication> </publications> </publish> Behind the scenes.When the user first selects the enhanced privacy mode while still in the standard privacy mode. These are included as a SERVICE request payload that is shown in the following example.0. Lync does this by submitting a SERVICE request containing a setContainerMemers command in the payload and specifying as the Content-Type header value “application/msrtcsetcontainermembers+xml”. the migration involves a number of specific steps.com"> <publication categoryName="otherOptions" instance="2" container="1" version="6" expireType="static"> <otherOptions xmlns="http://schemas.com/2006/09/sip/rich-presence"> <publications uri="sip:[email protected] SIP/2. These updates ensure that no contact is implicitly granted access permissions. opaque="FF54A518". In Lync 2010.com> Call-ID: f065c07412b84c9bab011f1d1a9aeb0e CSeq: 1 SERVICE Contact: <sip:bobkelly@contoso. cnum="34". crand="1e9b779b".epid=5fb4cad0ca To: <sip:[email protected]>.com". the sameEnterprise membership group is removed from containers 100 and 200 and Anahita.com"/> <member action="add" type="user" value="cyncarey@contoso. response="d5676513165378f83f38665eff97555fce66a313" Content-Type: application/msrtc-setcontainermembers+xml Content-Length: 487 <setContainerMembers xmlns="http://schemas. Presence information available to contacts in the public containers defined in Lync Presence information Presence State Display Name Email Address Title * Work Phone * Mobile Phone * Home Phone * Other Phone Company * Office * Blocked • • External Colleagues Workgroup Friends and Family ○ • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 35 . targetname="LYNC-SE. any of the remote contacts running a client of Office Communicator 2007. The following table summarizes the effect of the privacy modes.0 OC/4.microsoft. and HelpDesk are added explicitly as members of container 200. Live Communications Server 2005.com.contoso. Table 11.opaque=user:epid:NkxRZvAY1GqwgtgoyCyOwAA. or Live Communications Server 2003 are blocked from seeing the presence of a user who has the enhanced privacy mode enabled.0 (Microsoft Lync 2010) Proxy-Authorization: TLS-DSK qop="auth". realm="SIP Communications Service".com"/> <member action="add" type="user" value="[email protected]> User-Agent: UCCAPI/4.Max-Forwards: 70 From: <sip:[email protected]=070d2df50e.7577. Office Communicator 2007 R2.0.com"/> <member action="remove" type="sameEnterprise"/> </container> </setContainerMembers> In the previous example.7577. Privacy modes affect how Lync collects and publishes presence information. Cynthia.com/2006/09/sip/containermanagement"> <container id="100" version="3"> <member action="remove" type="federated"/> </container> <container id="200" version="4"> <member action="add" type="user" value="anahitab@contoso. Figure 8. confirm that the attributes will be shared before the information is shared.0/TLS 192. • Indicates that data is shared when running under the enhanced privacy mode. Roaming Application Data In addition to making a local user’s presence available to remote users. Alerts options Lync publishes the following SIP SERVICE request containing an alerts category instance to the user’s Self container (that is.0 Via: SIP/2. The end user must opt-in to share these attributes. a presence application can use the presence publication mechanism to roam application-specific data across multiple endpoints that are logged on. container 1) as shown in the following example. Roaming data is private and for local consumption only. It is published to the Self container (that is. after a user selects the “Notify me when someone adds me to his or her contact list” option on the Alerts page in the Lync Options window. SERVICE sip:bobkelly@contoso. # Indicates that sharing is disabled by default for these attributes. The following symbols in the table indicate specific behavior: * Indicates that if the attribute is defined in Active Directory. They are also visible to federated contacts. For example.Work Address * SharePoint Site * Meeting Location # Meeting Subject # Free Busy Working Hours No Location • Location # Notes (Out-of-Office Note) Notes (Personal) Last Active Personal/Active Directory Photo# • • • • • ○ • • ○ ○ • • ○ ○ • • • ○ • • ○ • • • • • • • • • • • • ○ • • • • • • • • Note. regardless of access level.tag=62aec7b75a.com>. the information will be available to all contacts in your company.168.155:62154 Max-Forwards: 70 From: <sip:anahitab@contoso. as shown in the following figure.epid=16ce6a1da0 To: <sip:[email protected]> Call-ID: 89e08728a9b842b9a4a469c044d7e733 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 36 . container 1). ○ Indicates that data is not shared when running under the enhanced privacy mode .com SIP/2.0. microsoft.com/2006/09/sip/rich-presence"> <publications uri="sip:anahitab@contoso. crand="e37c5e78".com/2006/09/sip/roaming-self" xmlns:cat="http://schemas.microsoft. realm="SIP Communications Service".tag=62aec7b75a. realm="SIP Communications Service".microsoft.125.epid=16ce6a1da0 To: <sip:[email protected]. response="569395c91b5e3c001ec8065b94a56634ce3dd204" Content-Type: application/msrtc-category-publish+xml Content-Length: 326 <publish xmlns="http://schemas.com/2006/09/sip/categories" uri="sip: [email protected]=23705D00 Content-Type: application/vnd-microsoft-roaming-self+xml <roamingData xmlns="http://schemas. opaque="D5ED691E".ms-receivedport=62154. targetname="Pool01.0.168.155:62154. snum="60".com>.com"> <category name="alerts" instance="0" publishTime="2011-05-06T03:36:33.com.contoso.340" container="1" version="9" expireType="static"> <alerts xmlns="http://schemas.com/2006/09/sip/options/alerts"/> </publication> </publications> </publish> When the request is accepted.7577.com".gruu> User-Agent: UCCAPI/4.contoso.microsoft. opaque="D5ED691E".0 OC/4.7577.tag=9B07C1614112F9B18B8C6D8A525986E4 Call-ID: 89e08728a9b842b9a4a469c044d7e733 CSeq: 1 SERVICE Via: SIP/2. version=4 Content-Length: 497 From: "Anahita"<sip:[email protected]/TLS 192. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 37 . Lync Server responds with the following SIP 200 OK message as shown in the following example.com/2006/09/sip/categories"> <categories xmlns="http://schemas. srand="A85DA2CE".CSeq: 1 SERVICE Contact: <sip:anahitab@contoso. cnum="60". SIP/2. targetname="Pool01. rspauth="b25dc9096a20a93ecb712606cc42d980bea07665". which is discussed in details in the next section.0.0 (Microsoft Lync 2010) Proxy-Authorization: TLS-DSK qop="auth".com>.com/2006/09/sip/options/alerts"></alerts> </category> </categories> </roamingData> The roaming data is also returned in the self-subscription.opaque=user:epid:2OMA5poxVOPb7Z4ozfhpAAA.received=157.microsoft.148.0 200 OK ms-user-logon-data: RemoteUser Authentication-Info: TLS-DSK qop="auth".com".com"> <publication categoryName="alerts" instance="0" container="1" version="8" expireType="static"> <alerts xmlns="http://schemas. application/xpidf+xml. The process involves interactions.com".0 Via: SIP/2.com. the SUBSCRIBE request has an expiration time of zero (0).com) in a query or as part of polling subscription to receive to the noteHistory of a remote user ([email protected]. The following example describes a SUBSCRIBE request made by Lync for the local user (bobkelly@contoso. a watcher can receive the published presence data through persistent subscription. application/rlmi+xml. The difference between a subscription and a query lies in the fact that the subscription is tied to a period of time whereas the query is one-time only.0.contoso.7577.168.com>. The persistent subscription is characterized by the Lync Server pushing the data whenever a publication is created or modified.7577. not directly to the individual publishers.0. cnum="14".tag=8654485aef. categoryList Supported: eventlist Proxy-Authorization: TLS-DSK qop="auth". All of the SUBSCRIBE requests are submitted to the Lync Server.0/TLS 192. targetname="LYNC-SE. polling subscription.microsoft. The difference between a persistent subscription and a polling subscription lies in the fact that a SIP dialog is involved in a persistent subscription whereas it is not in a polling subscription. SUBSCRIBE sip:bobkelly@contoso. and query all start with a client submitting a SIP SUBSCRIBE request that contains the specified category names and publishers SIP URIs. multipart/related Supported: com.com).epid=5fb4cad0ca To: <sip:[email protected] OC/4. the persistent subscription. between the presence watcher and the server. realm="SIP Communications Service". polling subscription or query.gruu> User-Agent: UCCAPI/4.com SIP/2. In a query or a polling subscription. In a Lync Server 2010 deployment. Receiving Presence Publications by Using SIP SUBSCRIBE Requests Operationally.0 (Microsoft Lync 2010) Event: presence Accept: application/msrtc-event-categories+xml.Subscription Presence subscription provides a mechanism for a presence watcher to receive specified presence information published by a given publisher.pidf. provided that the watcher is granted permission by the publisher to access the presence data.autoextend Supported: ms-benotify Proxy-Require: ms-benotify Supported: ms-piggyback-first-notify Expires: 0 Require: adhoclist. the Lync Server client periodically queries the server to obtain the data. in the form of SIP messages. response="c51d1c2ae8c63ed10d6a87d68646ea1e62c10a92" Content-Type: application/msrtc-adrl-categorylist+xml Content-Length: 355 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 38 . crand="fa6dbab7".com> Call-ID: 6ce5f131bf60434c9cf15b14bf82f48e CSeq: 1 SUBSCRIBE Contact: <sip:bobkelly@contoso. whereas it is not specified in the SUBSCRIBE request in a persistent subscription.40:54364 Max-Forwards: 70 From: <sip:bobkelly@contoso. text/xml+msrtc.opaque=user:epid:NkxRZvAY1GqwgtgoyCyOwAA. opaque="279520A0". In a polling subscription. application/pidf+xml. com". srand="5B6EFD4F".com" version="0" fullState="false"/> --bfd74156b52c441c98b8e3d27b840bbe Content-Transfer-Encoding: binary Content-Type: application/msrtc-event-categories+xml Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 39 .com:5061. the Expires header will be absent from the SUBSCRIBE request. In a persistent subscription. boundary=bfd74156b52c441c98b8e3d27b840bbe Event: presence subscription-state: terminated.contoso.com>. the server responds with an SIP 200 OK response containing the requested data.ms-received-port=54364.ms-received-cid=380900 Expires: 0 Require: eventlist Content-Type: multipart/related.contoso.microsoft.com/2006/09/sip/categorylist"> <category name="noteHistory"/> </categoryList> </action> </batchSub> The previous request is either from a query or part of a polling subscription because the Expires header value is set to zero (0). rspauth="1891e3d14c9822c7dc1589cf3479fc9febd67bed".0 200 OK Contact: <sip:LYNC-SE.expires=0 ms-piggyback-cseq: 1 Supported: ms-benotify. opaque="279520A0".0/TLS 192.0. realm="SIP Communications Service". targetname="LYNCSE.tag=8654485aef.epid=5fb4cad0ca To: <sip:[email protected]"/> </adhocList> <categoryList xmlns="http://schemas.<batchSub xmlns="http://schemas.168. When accepted.com" name=""> <action name="subscribe" id="103843728"> <adhocList> <resource uri="sip:anahitab@contoso. ms-piggyback-first-notify --bfd74156b52c441c98b8e3d27b840bbe Content-Transfer-Encoding: binary Content-ID: resourceList Content-Type: application/rlmi+xml <list xmlns="urn:ietf:params:xml:ns:rlmi" uri="sip:[email protected]:54364. SIP/2. An example of the SIP response to this SIP SUBSCRIBE request is shown in the following example.com>. snum="15".transport=tls> Authentication-Info: TLS-DSK qop="auth". type="application/rlmi+xml". version=4 Content-Length: 769 From: "Bob"<sip:[email protected]=resourceList.tag=BE180080 Call-ID: 6ce5f131bf60434c9cf15b14bf82f48e CSeq: 1 SUBSCRIBE Via: SIP/2.com/2006/01/sip/batch-subscribe" uri="sip:bobkelly@contoso. 937"> <noteHistory xmlns="http://schemas.com/2006/09/sip/categories" uri="sip:[email protected]"> <category name="noteHistory" instance="1864567" publishTime="2010-1229T20:19:02.com/2006/09/sip/note"> <body type="personal" uri="">LYNC 2010 is COOL!!!</body> </noteHistory> </category> </categories> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 40 .microsoft.<categories xmlns="http://schemas.microsoft. the Lync Server client repeats the process at a given time interval. By default. The first part lists the SIP URI of the subscribing user (that is. the user will not be notified of any additional subscription attempts. It determines the maximum number of prompts that a user can get when someone else subscribes to his or her presence. the server expects the client to respond with SIP response. A presence policy has the following properties:   CategorySubscriptions. Lync Server 2010 is configured with the following presence policies:   Default Policy. The zero value means that the user is not notified when he or she is added to a persistent subscription by someone else. Service: Medium. Due to the resource constraints on the server. modified. For a polling subscription. You can verify that this is indeed the response to the preceding SIP SUBSCRIBE request by checking that the Call-ID and CSeq headers values match in the both messages.com in this example). The second part contains the subscribed category data published by the specified remote user (that is. When this is set to zero. the maximum number of persistent subscribers is 1500. the state category). the maximum number of persistent subscribers permitted on a presentity is determined by the CategorySubscriptions value divided by the number of subscribed categories. at the request of the subscribing client or when the subscribing user logs off. sip:bobkelly@contoso. For a persistent subscription. If a client subscribes to two categories (for example. a client response is not needed. this is all that happens and the operation completes. The value ranges between 0 and 500. the state and note categories). If it is greater than zero. This is the presence policy for applications or services in which a large number of users must subscribe to the presence published by the applications Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 41 .com in this example). This is the maximum number of categories that can be subscribed to on a presence publisher. The value of this property ranges between 0 and 3000. the maximum number of persistent subscribers is 3000. PromptedSubscribers. For the BENOTIFY request. inclusively. no one can persistently subscribe to any presence of a presentity. Lync Server must maintain a list of presence subscribers for each presence publisher. This is the maximum number of queued presence subscription alerts. If CategorySubscriptions is set to 3000 and a client chooses to subscribe to a single category (for example.The payload of this SIP response has two related parts. or removed. For the NOTIFY request. The maximum number is specified in the presence policy settings that can be configured by a Lync Server 2010 administrator. this number is limited. sip:anahitab@contoso. For a query. This is the default presence policy for typical users in which the CategorySubscriptions property is set to 1000 and the PromptedSubscribers property is set to 200. the Lync Server pushes the publication down to the subscribers by sending them a NOTIFY or BENOTIFY request containing the requested presence category data whenever the data is created. The process continues until the subscription is terminated. Optimizing Lync Server Load with Presence Policy in Persistent Subscription or by Using Polling Subscription For persistent subscription. When the number of persistent subscriptions in the queue reaches the limit set by this property. opaque=user:epid:2OMA5poxVOPb7Z4ozfhpAAA. Receiving Contacts Lists before Subscribing to Their Presence A Contacts list consists of a list of the SIP URIs of the remote users (or presentities) whose presence is monitored in a remote subscription.com>. opaque="3B6A34E9".tag=1DA1AD6C Call-ID: 47b40f5af3d143279a714400c5e34808 CSeq: 4 SERVICE Contact: <sip:[email protected]=tls.com/winrtc/2002/11/sip"><m:displayName/> <m:groups>1 6 </m:groups> <m:subscribed>true</m:subscribed> <m:URI>sip:[email protected]</m:URI> <contactExtension><contactSettings source="outlook" contactId="7bc6ef25-b06b-43059fc6-ebb1a780787b"></contactSettings> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 42 . cnum="147". crand="86d0dd90". A remote user is added to the Contacts list when the local user copies the remote user to a contact group.com>. a presence application can resort to polling subscriptions in which the presence policy setting of the CategorySubscriptions property does not apply and there is no limit on how many presence watchers the server can handle.com/fwlink/?LinkId=188704. Lync stores the Contacts list on the Lync Server.com". see “Managing Presence Policies” in the TechNet Library at http://go.contoso.microsoft. Lync submits a SERVICE request to the Lync Server.0/TLS 10. When the required number of persistent subscriptions reaches beyond the maximum limit or when the maximum value is too high to ensure reliable performance. The CategorySubscriptions property is set to 3000 and the PromptedSubscribers property is set to 0.com SIP/2. When the local user adds a contact to a contact group. Setting too high a value on the CategorySubscriptions property can have a significant adverse impact on the server’s performance when the average user has a large number of persistent presence watchers. it is possible that the contact's presence may appear unknown to some subscribers.org/soap/envelope/"> <SOAP-ENV:Body> <m:setContact xmlns:m="http://schemas.7577.xmlsoap. For a popular contact whose presence is subscribed to by many other users. The message payload contains the specified contact’s SIP URI and group ID within a SOAP envelope.tag=0c40725f3c.0.or services.ms-fe=LYNC-SE.epid=16ce6a1da0 To: <sip:bobkelly@contoso. realm="SIP Communications Service". response="80e1ae82866dbbfd7aed0a8308dfa9c2c2945a6c" Content-Type: application/SOAP+xml Content-Length: 533 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.24. SERVICE sip:LYNC-SE.80.contoso.gruu> User-Agent: UCCAPI/4.0 OC/4. For information about how to configure the presence policy.0 Via: SIP/2.com:5061.contoso. Following is an example of the SERVICE request.0 (Microsoft Lync 2010) Supported: msrtc-ucs Proxy-Authorization: TLS-DSK qop="auth". targetname="LYNC-SE.0.7577.214:62084 Max-Forwards: 70 From: <sip:[email protected]. Setting a value too low on this property may prevent some contacts from receiving the presentity's presence at all.microsoft. microsoft.7577.com".com> Call-ID: 70cf12e227d7463db7b282ab6c4dff37 CSeq: 1 SUBSCRIBE Contact: <sip:[email protected]:54364 Max-Forwards: 70 From: <sip:bobkelly@contoso. It does so.tag=44f75f3015.0 OC/4.gruu> User-Agent: UCCAPI/4. the SERVICE request is made to the server (that is.com/winrtc/2002/11/sip"> <m:name>New Group</m:name> <m:externalURI/> <m:deltaNum>135</m:deltaNum> </m:addGroup> </SOAP-ENV:Body> </SOAP-ENV:Envelope> To receive the presence publication or update of the contacts. response="0d63b6b06fa75d6e1d6498ae1b4f020a509c00c6" Content-Length: 0 The Event header value is specified as “vnd-microsoft-roaming-contacts” and Accept header value is “application/vnd-microsoft-roaming-contacts+xml”.0. Bob Kelly) to add Anahita to contact groups 1 and 6. SUBSCRIBE sip:[email protected] (Microsoft Lync 2010) Event: vnd-microsoft-roaming-contacts Accept: application/vnd-microsoft-roaming-contacts+xml Supported: com. Lync first retrieves the Contacts list.com) by the local user (that is.com SIP/2. after the user is signed in. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 43 .com.opaque=user:epid:NkxRZvAY1GqwgtgoyCyOwAA.” <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.contoso.epid=5fb4cad0ca To: <sip:bobkelly@contoso. New contact groups are added to the server in the same fashion with a different SOAP envelope containing the specified contact group.0. sip:LYNCSE.com>. targetname="LYNC-SE. cnum="3". crand="1b0f2b97". from the Lync Server.</contactExtension> <m:externalURI></m:externalURI> <m:deltaNum>137</m:deltaNum> </m:setContact> </SOAP-ENV:Body> </SOAP-ENV:Envelope> In this example.autoextend Supported: ms-benotify Proxy-Require: ms-benotify Supported: ms-piggyback-first-notify Proxy-Authorization: TLS-DSK qop="auth". including contact groups.0/TLS 192. by submitting the following SUBSCRIBE request without a payload.0 Via: SIP/2.xmlsoap.7577.0. realm="SIP Communications Service".org/soap/envelope/"> <SOAP-ENV:Body><m:addGroup xmlns:m="http://schemas.168. opaque="279520A0". The following example illustrates this SOAP message body for creating a contact group named “New Group. SIP/2.com SIP/2.0/TLS 192. realm="SIP Communications Service".&lt.com>. [email protected]=27503 ms-piggyback-cseq: 1 Supported: ms-benotify.email/&gt. srand="B0FB0C3F". groups 1 and 2 are two default contact groups. targetname="LYNCSE.0 Via: SIP/2. This can be done using a polling or persistent subscription.com and [email protected]=81643067ba. note. and state) by the remote users (that is.0 200 OK Contact: <sip:LYNC-SE.transport=tls> Authentication-Info: TLS-DSK qop="auth".ms-received-port=54364./groupExtension&gt. as shown in the following example.0/TLS 192. snum="3".epid=5fb4cad0ca To: <sip:bobkelly@contoso. ms-piggyback-first-notify <contactList deltaNum="7" > <group id="1" name="~" externalURI="" /> <group id="2" name="Pinned Contacts" externalURI="&lt. version=4 Content-Length: 585 From: "Bob"<sip:[email protected]:54364.155:51390 Max-Forwards: 70 From: <sip:bobkelly@contoso." /> <contact uri="anahitab@contoso. services.pinnedGroup&quot. calendarData.tag=44f75f3015. contactCard.com>.0.com in this example).epid=16ce6a1da0 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 44 . a Lync Server client can start to subscribe to the presence of the remote contacts.com>.ms-received-cid=380900 Expires: 27503 Content-Type: application/vnd-microsoft-roaming-contacts+xml Event: vnd-microsoft-roaming-contacts subscription-state: active. rspauth="b8bb693aec8cf66fbdb40f3749257bad34bcf91c".168. The second group is used by Lync and is not visible to the user.com" name="" groups="1" subscribed="true" externalURI="" /> <contact uri="cyncarey@contoso.&gt. SUBSCRIBE sip:[email protected]".168.tag=01FD4572 Call-ID: 70cf12e227d7463db7b282ab6c4dff37 CSeq: 1 SUBSCRIBE Via: SIP/2.com" name="" groups="1" subscribed="true" externalURI="" > <contactExtension><contactSettings source="outlook" contactId="4ae7fb20-11b7-4acd9932-b01a3629e8dc" ></contactSettings> </contactExtension> </contact> </contactList> As returned in this example.The server returns the results in a SIP 200 OK response. Receiving Remote Presence by Using a Persistent Subscription After the Contacts list is received. opaque="279520A0".com:5061.contoso.groupExtension groupType=&quot.com in this example) to receive new or updated presence publications (that is. The following SUBSCRIBE request initiates a persistent subscription for the local user (that is.0.contoso. The first one corresponds to the “Other Contacts” group on the Lync Groups page. anahitab@contoso.&lt. com" name=""> <action name="subscribe" id="181311632"> <adhocList> <resource uri="sip:[email protected] (Microsoft Lync 2010) Event: presence Accept: application/msrtc-event-categories+xml.0.gruu> User-Agent: UCCAPI/4.com/2006/09/sip/categorylist"> <category name="state"/> <category name="contactCard"/> <category name="services"/> <category name="note"/> <category name="calendarData"/> </categoryList> </action> </batchSub> This subscription is subject to the limitations of the presence policy discussed earlier. cnum="13". note and calendarData.0.7577. application/pidf+xml.com".To: <sip:[email protected] Supported: ms-benotify Proxy-Require: ms-benotify Supported: ms-piggyback-first-notify Require: adhoclist. Partial results might be returned.com.com "/> <resource uri="sip:[email protected]> Call-ID: f0dc3382e27740a989d8145f2fc33583 CSeq: 1 SUBSCRIBE Contact: <sip:bobkelly@contoso. text/xml+msrtc. the submitting client receives a SIP 200 OK response containing the requested result.contoso. targetname="Pool01.7577.com/2006/01/sip/batch-subscribe" uri="sip:[email protected] "/> </adhocList> <categoryList xmlns="http://schemas. services.pidf. because he has chosen to subscribe to five categories of state. response="555c0bb62826a14fbc4cd3c52a550478f2f148c5" Content-Type: application/msrtc-adrl-categorylist+xml Content-Length: 1476 <batchSub xmlns="http://schemas. srand="CA11761B".microsoft. A portion of that response is shown in the following example. multipart/related Supported: com. application/xpidf+xml. SIP/2. opaque="64DD2BFE". realm="SIP Communications Service".microsoft.0 200 OK ms-user-logon-data: RemoteUser Authentication-Info: TLS-DSK qop="auth". After the request is accepted by the server.0 OC/4. opaque="EF9CEB7C". rspauth="7948287280886daef0c0ec84e59b83673291ac10". contactCard. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 45 .opaque=user:epid:2OMA5poxVOPb7Z4ozfhpAAA. application/rlmi+xml. categoryList Supported: eventlist Proxy-Authorization: TLS-DSK qop="auth". snum="17". the maximum number of contacts that Bob can add to his Contacts list is 600. When the CategorySubscriptions property is set to 3000. crand="d3e6517a". [email protected]:5061.125.epid=16ce6a1da0 To: <sip:[email protected]=3c9ce897ad.com.com:443.contoso.opaque=srvr:HomeServer:GEAUnGh6lqC9C0_AgsCUQAA"/> </resource> --cad79b9531f84c7188ba13cadcb25c46 Content-Transfer-Encoding: binary Content-Type: application/msrtc-event-categories+xml <categories xmlns="http://schemas.fabrikam.com>.39:49206.36.targetname="TK5W1402FE03.54.fabrikam.com:5061.com.50.com "> <instance id="0" state="resubscribe" cid="[email protected]=srvr:HomeServer:GEAUnGh6lqC9C0_AgsCUQAA"/> </resource> <resource uri="sip:[email protected]=state:[email protected]>.com"> <category name="calendarData"/> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 46 .1.com".microsoft.R661dc500.fabrikam.148.lr.gruu.com" version="0" fullState="false"/> <resource uri="sip:[email protected]/2006/09/sip/categories" uri="sip:[email protected]> Content-Length: 64643 From: "Ivan Komashinsky"<sip:ivankom@fabrikam. type="application/rlmi+xml".31.msfe=000DCO2O40FE13.ms-received-cid=661DC500 Expires: 23183 Require: eventlist Content-Type: multipart/related.ms-receivedport=12137.gruu.com.fabrikam.0/TLS 192.transport=tls.tag=46540080 Call-ID: 8f71a150f220450f8f683b6ce3bb57a7 CSeq: 1 SUBSCRIBE Via: SIP/2.expires=23183 ms-piggyback-cseq: 1 Supported: ms-piggyback-first-notify Record-Route: <sip:tk5w1402cl.transport=tls. realm="SIP Communications Service".ms-received-cid=64D8BE00> Record-Route: <sip:sipalt.com" poolFqdn=" sip:pool01. boundary=cad79b9531f84c7188ba13cadcb25c46 Event: presence subscription-state: active.ms-routesig=fgPISBzC_7dUJmeYljjxHqKd0bLy9wO8YN5M7FTKJpMC39Tc8cR1VafQAA> --cad79b9531f84c7188ba13cadcb25c46 Content-Transfer-Encoding: binary Content-ID: resourceList Content-Type: application/rlmi+xml <list xmlns="urn:ietf:params:xml:ns:rlmi" uri="sip:[email protected]=10.com"> <instance id="0" state="resubscribe" cid="[email protected]=resourceList. version=4 Contact: <sip:000dco2o40pl1.msfe=TK5W1402FE03.transport=tls.com" poolFqdn="sip:pool01. 257"> <contactCard xmlns="http://schemas.com"> <capabilities> <text render="false" capture="false" deviceAvailability="15500" /> <gifInk render="false" capture="false" deviceAvailability="15500" /> <isfInk render="false" capture="false" deviceAvailability="15500" /> <applicationSharing render="false" capture="false" deviceAvailability="15500" /> <voice render="true" capture="true" deviceAvailability="15500" /> <video render="false" capture="false" deviceAvailability="15500" /> <contentWhiteboard render="false" capture="false" deviceAvailability="15500" /> <contentPoll render="false" capture="false" deviceAvailability="15500" /> <contentPowerPoint render="false" capture="false" deviceAvailability="15500" /> <contentNativeFile render="false" capture="false" deviceAvailability="15500" /> </capabilities> </service> </services> </category> Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 47 ..</body> </note> </category> <category name="state" instance="1" publishTime="2011-05-09T02:47:35.com/2006/09/sip/contactcard" > <identity > <name ><displayName >Anahita</displayName></name> <email >[email protected]/2006/09/sip/commontypes" /> <timeZoneBias>420</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>Pacific Daylight Time</timeZoneAbbreviation> <device>deskphone</device> <end xmlns="http://schemas.microsoft.microsoft.510"> <contactCard xmlns="http://schemas.com/2006/09/sip/commontypes" /> </state> </category> <category name="services" instance="0" publishTime="2011-05-09T02:47:35..com/2006/09/sip/service"> <service uri="sip:[email protected]"> <services xmlns="http://schemas..w3.com/2006/09/sip/contactcard" isUCEnabled="false"> </contactCard> </category> <category name="note" instance="0" publishTime="2010-07-06T22:50:09.813"> <note xmlns="http://schemas.microsoft.<category name="contactCard" instance="0" publishTime="2010-07-13T02:48:52.microsoft.microsoft.com/2006/09/sip/note"> <body type="personal" uri="">Another day at work.com</email> </identity> </contactCard> </category> <category name="contactCard" instance="4" publishTime="2010-07-06T22:49:21.microsoft.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>15500</availability> <delimiter xmlns="http://schemas.263"> <state xsi:type="aggregateState" lastActive="2011-05-09T02:47:36" xmlns:xsi="http://www. simply.0 (Microsoft Lync 2010) Event: vnd-microsoft-roaming-self Accept: application/vnd-microsoft-roaming-self+xml Supported: com. subscription.com/2007/09/sip/roaming-self-ex" type="delegates"/> </roamingList> For a self-subscription.7577.0. opaque="279520A0". cnum="5".epid=5fb4cad0ca To: <sip:[email protected]/2006/09/sip/roaming-self"> <roaming type="categories"/> <roaming type="containers"/> <roaming type="subscribers"/> <roamingEx xmlns="http://schemas.com". realm="SIP Communications Service".contoso. The following example shows a SIP SERVICE request that started a self-subscription. Receiving Roaming Data by Using Self-Subscription A presence application can use the subscription infrastructure to receive published presence data by other users.0 OC/4.0.168. The data include the local user’s list of contacts.40:54364 Max-Forwards: 70 From: <sip:bobkelly@contoso. the presence data already published by the local user (that is. The subscription involved is referred to as the remote subscription or. This process is known as self-subscription.0. self-presence).com> Call-ID: 2e8e76009d544ebab9f571387851db1d CSeq: 1 SUBSCRIBE Contact: <sip:bobkelly@contoso. the Event header has the value of “vnd-microsoft-roaming-self” and the Accept header value is “application/vnd-microsoft-roaming-self+xml”.0/TLS 192. the self-subscription starts with a SERVICE request. The first part consists of the list of the subscribed contacts.7577.microsoft. targetname="LYNC-SE. “--cad79b9531f84c7188ba13cadcb25c46” in this example). crand="778faba6". separated by a GUID value (that is.opaque=user:epid:NkxRZvAY1GqwgtgoyCyOwAA. SUBSCRIBE sip:bobkelly@contoso. response="271a742d65e0c9664d65735e7ec19ec24523db7f" Content-Type: application/vnd-microsoft-roaming-self+xml Content-Length: 268 <roamingList xmlns="http://schemas. In a persistent subscription.The message body of the response consists of multiple parts.microsoft. and the application settings configurable by the local user.tag=f85eb73b02.com SIP/2.0 Via: SIP/2.gruu> User-Agent: UCCAPI/4. The self- Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 48 . also known as remote users. The application can also use the subscription framework to receive self-consumed data that is stored on the Lync Server. In addition.microsoft.com>. And the ensuing parts each contain the subscribed presence of a contact.autoextend Supported: ms-benotify Proxy-Require: ms-benotify Supported: ms-piggyback-first-notify Proxy-Authorization: TLS-DSK qop="auth". the Lync Server sends the results to all the signed-in clients of the local user using NOTIFY or BENOTIFY requests. the server will continue to send NOTIFY or BENOTIFY whenever the subscribed-to publications are updated.com. As with a remote subscription. version=4 Content-Length: 30628 From: "Bob"<sip:[email protected]/2006/09/sip/calendarData" mailboxID="bobkelly@contoso. snum="5".com/2006/09/sip/presence-subscribers" xmlns:del="http://schemas.microsoft.com/2007/09/sip/delegates"> <categories xmlns="http://schemas. realm="SIP Communications Service".com"><WorkingHours xmlns="http://schemas. The body of the SIP request message specifies the types of data to be received in the selfsubscription.epid=5fb4cad0ca To: <sip:[email protected]".microsoft. a SIP response is shown in the following example. the containers used by the local user for publications.com"> <category name="calendarData" instance="0" publishTime="2010-12-29T18:05:38.microsoft. ms-piggyback-first-notify <roamingData xmlns="http://schemas.0 200 OK Contact: <sip:LYNC-SE.com/2006/09/sip/roaming-self" xmlns:cat="http://schemas.ms-received-cid=380900 Expires: 26496 Require: eventlist Content-Type: application/vnd-microsoft-roaming-self+xml Event: vnd-microsoft-roaming-self subscription-state: active.ms-received-port=54364.com/2006/09/sip/containers" xmlns:sub="http://schemas.contoso.com/2006/09/sip/categories" xmlns:con="http://schemas. rspauth="c66167dfebef6878384e8b3d0ef898005848e848".560" container="400" version="1" expireType="static"> <calendarData xmlns="http://schemas. and the remote users that are currently subscribing to the local user’s presence.40:54364. they include the presence categories published by the local user. Note.microsoft.168. For the preceding example.microsoft.microsoft.207" container="32000" version="3" expireType="time" expires="45653"> <calendarData xmlns="http://schemas. and the users designated as the delegates of the local user. The response has been truncated for the sake of brevity.com/2006/09/sip/calendarData"></calendarData> </category> <category name="calendarData" instance="1521659821" publishTime="2011-0506T07:00:08.subscription is persistent because the Expires header is not present in the SIP message.transport=tls> Authentication-Info: TLS-DSK qop="auth".microsoft.com:5061.microsoft. srand="0E94188B".contoso. as shown in this example.microsoft. opaque="279520A0".tag=f85eb73b02.tag=84670080 Call-ID: 2e8e76009d544ebab9f571387851db1d CSeq: 1 SUBSCRIBE Via: SIP/2. SIP/2.com/exchange/services/2006/types"><TimeZone><Bias> 480</Bias><StandardTime><Bias>0</Bias><Time>02:00:00</Time><DayOrder>1</Day Order><Month>11</Month><DayOfWeek>Sunday</DayOfWeek></StandardTime><Dayli Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 49 .com/2006/09/sip/calendarData"></calendarData> </category> <category name="calendarData" instance="0" publishTime="2010-12-29T18:05:38.0.560" container="32000" version="2" expireType="static"> <calendarData xmlns="http://schemas.com>. In Lync. targetname="LYNCSE.0/TLS 192.microsoft. The results are returned to the requesting client in a SIP 200 OK response. You can view a full response via tracing.expires=26496 ms-piggyback-cseq: 1 Supported: ms-benotify.com>.com/2006/09/sip/categories" uri="sip:bobkelly@contoso. com/2006/09/sip/calendarData" mailboxID="[email protected]" container="200" version="1" expireType="static"> <calendarData xmlns="http://schemas.microsoft.207" container="400" version="3" expireType="time" expires="45653"> <calendarData xmlns="http://schemas.microsoft.com"> The process continues until the user signs out or the subscription is terminated.com/2006/09/sip/calendarData" xmlns="http://schemas.com/2006/09/sip/calendarData" mailboxID="bobkelly@contoso. Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 50 .microsoft.com"> <freeBusy startTime="2011-05-05T07:00:00Z" granularity="PT15M" encodingVersion="1">AAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAA</freeBusy> </calendarData> </category> <category name="calendarData" instance="0" publishTime="2010-12-29T18:05:38.com"> <WorkingHours xmlns:autons1="http://schemas.com/2006/09/sip/calendarData" mailboxID="[email protected]"><freeBusy startTime="2011-05-05T07:00:00Z" granularity="PT15M" encodingVersion="1">AAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAA</freeBusy></calendarData> </category> <category name="calendarData" instance="0" publishTime="2010-12-29T18:05:38.microsoft.com/2006/09/sip/calendarData" mailboxID="[email protected]><Bias>60</Bias><Time>02:00:00</Time><DayOrder>2</DayOrder><Month>3</Month><DayO fWeek>Sunday</DayOfWeek></DaylightTime></TimeZone><WorkingPeriodArray><Worki ngPeriod><DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek><StartTimeInMinutes>480</StartTimeInMinutes><EndTimeInMinutes >1020</EndTimeInMinutes></WorkingPeriod></WorkingPeriodArray></WorkingHours></c alendarData> </category> <category name="calendarData" instance="1521659821" publishTime="2011-0506T07:00:08.207" container="300" version="3" expireType="time" expires="45653"> <calendarData xmlns="http://schemas.560" container="300" version="1" expireType="static"> <calendarData xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><TimeZone><Bias> 480</Bias><StandardTime><Bias>0</Bias><Time>02:00:00</Time><DayOrder>1</Day Order><Month>11</Month><DayOfWeek>Sunday</DayOfWeek></StandardTime><Dayli ghtTime><Bias>60</Bias><Time>02:00:00</Time><DayOrder>2</DayOrder><Month>3</Month><DayO fWeek>Sunday</DayOfWeek></DaylightTime></TimeZone><WorkingPeriodArray><Worki ngPeriod><DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek><StartTimeInMinutes>480</StartTimeInMinutes><EndTimeInMinutes >1020</EndTimeInMinutes></WorkingPeriod></WorkingPeriodArray></WorkingHours> </calendarData> </category> <category name="calendarData" instance="1521659821" publishTime="2011-0506T07:00:08. ietf.org/rfc/rfc3863.ietf.microsoft.txt A Model for Presence and Instant Messaging http://tools.ietf.ietf.txt A Data Model for Presence http://tools.org/rfc/rfc3265.txt RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF) http://tools.ietf. The process involves SIP-based messaging to enable the presence publication.com/fwlink/?LinkId=223572 Microsoft Lync Server 2010 Resource Kit Enhanced Presence Page 51 .com/fwlink/? LinkId=223573 Unified Communications Enhanced Presence Schemas for Microsoft Lync Server 2010 Documentation http://go.org/rfc/rfc4479. Additional Resources For more information.ietf.0 200 OK response from the server.org/rfc/rfc4481.org/rfc/rfc4566.txt Presence Information Data Format (PIDF) http://tools.txt [MS-PRES]: Presence Protocol Specification http://go.ietf.ietf. see the “Client Provisioning” section in the “Instant Messaging” chapter of the Resource Kit available for download from the Microsoft Download Center at http://go.microsoft. you learned that Lync Server 2010 provides an enhanced presence service that relays presence information between two communication entities.txt Session Initiation Protocol (SIP) User Agent Capability Extension to Presence Information Data Format (PIDF) http://tools.txt Timed Presence Extensions to the Presence Information Data Format (PIDF) to Indicate Status Information for Past and Future Time Intervals http://tools.com/fwlink/?LinkId=211003. This process is known as in-band provisioning and involves the Lync Server client submitting a SUBSCRIBE request containing the provisioning group names and parsing the results returned in a SIP/2.Receiving Lync Server Configuration Settings and Other System Data by Using In-band Provisioning The subscription mechanism is also used by the Lync Server to provision configuration data and policy settings. see the following:               SIP: Session Initiation Protocol http://www. The versatility is supported by a flexible XML-based presence data model as represented by the enhanced presence category. subscription.org/rfc/rfc5196.ietf.ietf.txt Session Initiation Protocol (SIP)-Specific Event Notification http://tools.org/rfc/rfc3903.ietf.ietf.txt A Watcher Information Event Template-Package for the Session Initiation Protocol (SIP) http://tools.org/rfc/rfc4482.org/rfc/rfc3261.txt Session Initiation Protocol (SIP) Extension for Event State Publication http://tools.org/rfc/rfc3857.microsoft.txt CIPID: Contact Information for the Presence Information Data Format http://tools. and querying. Summary In this chapter. This presence system is versatile and can handle any application-specific presence data.org/rfc/rfc4480. For details.txt SDP: Session Description Protocol http://www.org/rfc/rfc2778.
Copyright © 2024 DOKUMEN.SITE Inc.