2.2.2.7.1 state
The state category is used to represent the various presence states associated with a user. The server aggregates instances of the state category to compute a user's overall presence state. For details about aggregation, see section 3.8.5.
The following examples illustrate the format of a state category instance.
-
<state xmlns="http://schemas.microsoft.com/2006/09/sip/state" manual="false" uri="bob@contoso.com" startTime="2008-01-11T19:00:00Z" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="calendarState"> <availability>6500</availability> <activity token="in-a-meeting" minAvailability="6500" maxAvailability="8999" /> <endpointLocation> </endpointLocation> <meetingSubject>Customer Meeting</meetingSubject> <meetingLocation>Conf Room 100</meetingLocation> </state> <state xmlns="http://schemas.microsoft.com/2006/09/sip/state" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manual="false" xsi:type="machineState"> <availability>5000</availability> <endpointLocation>Work_Custom_Endpoint_Location</endpointLocation> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"/> <timeZoneBias>999</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>PDT</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"/></state> <state xsi:type="aggregateState" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>9500</availability> <activity> <custom LCID="1033">Interviewing</custom> </activity> <delimiter xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"/> <timeZoneBias>999</timeZoneBias> <timeZoneName>Pacific Daylight Time</timeZoneName> <timeZoneAbbreviation>PDT</timeZoneAbbreviation> <device>computer</device> <end xmlns="http://schemas.microsoft.com/2006/09/sip/commontypes"/> </state> <state xsi:type="aggregateMachineState" endpointId="221ef77e-3a68-5570-86ed-6ea5bd4b7ff8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2006/09/sip/state"> <availability>5000</availability> </state>
Elements and attributes are defined as follows. For the full XML schema, see section 7.
The XML elements of a state document MUST conform to the schema defined in section 7.2
state: The root element of a state category instance. It has the following attributes:
xsi:type (required): The type of the state element. It MUST have one of the following values:
userState: This instance type reflects a presence state that was manually set by the user.
machineState: This instance type reflects the presence state of the physical device used by a user. It indicates how active an endpoint is at the current time. The SIP protocol client monitors keyboard and mouse activity to determine the value of this state. The SIP protocol client publishes this type of instance for each of a user's endpoints.
calendarState: This instance type reflects the presence state of user's calendar. The SIP protocol client uses the user's calendar information to publish this type of instance.
phoneState: This instance type reflects the presence state of the user's voice or video conversations. The SIP protocol client publishes this type of instance based on the voice or video conversations in which the user is currently engaged.
aggregateState: This instance type represents the user's overall presence state.
aggregateMachineState: This instance type represents the overall presence state of all physical devices used by a user. This presence state is an aggregation(2) of all of the machineState instance types.
presentingState: This instance type of presence state indicates that user is in a presentation.<3>
uri (optional): The URI associated with the phoneState and calendarState instances. It specifies the mailbox identifier in calendarState instance types and the tel URI in phoneState instance types.
manual (optional): Specifies whether the state is published by a user manually, true or false.
startTime (optional): Specifies the starting time when the state became effective.
endpointId (optional): Specific to aggregateMachineState instance type. This is an endpoint identifier of the most active machineState chosen by the computing function when creating aggregateMachineState as described in section 3.8.5.
lastActive (optional): The time, in UTC, that the user became unavailable for communications. This attribute is specific to the aggregateState instance type.
majorVersion (optional): The major version of schema format.
minorVersion (optional): The minor version of schema format.
availability: A child element of the state element. It contains a number representing the availability of a presence state as follows:
Unknown: 0 to 2999. availability is undefined.
Online: 3000 to 4499. Willing and able to communicate.
Idle: 4500 to 5999. Willing but potentially unable to communicate.
Busy: 6000 to 7499. Able but potentially unwilling to communicate.
BusyIdle: 7500 to 8999. Able but potentially unwilling to communicate.
DoNotDisturb: 9000 to 11999. Able but potentially unwilling to communicate.
Away: 12000 to 17999. Willing but unable to communicate.
Offline: 18000 and higher. Not available to communicate.
activity: A child element of the state element. It contains the activities that triggered the state. It has the following attributes:
token (optional): Localizable token that represents the activity string of a state.
maxAvailability (optional): Highest availability for which this activity is valid. For details about how this attribute is used, see section 3.8.5.
minAvailability (optional): Lowest availability for which this activity is valid. For details about how this attribute is used, see section 3.8.5.
custom: A child element of the activity element. It represents a language-specific string which is associated with an LCID when token is absent. It has the following attributes:
LCID (optional): Locale identifier for the activity string.
updated (optional): Last time, specified in UTC, that the custom element was updated.
endpointLocation: A child element of the state element. This represents the location of a device associated with the user's endpoint. The endpointLocation element SHOULD be published by the SIP protocol client as part of its machine state. This element is specific to the machineState and aggregateState instance types.
meetingSubject: A child element of the state element. This represents the subject of the user's calendar meeting. This element is specific to the calendarState and aggregateState instance types. It MAY have the following attributes.
LCID (optional): Locale identifier for the meeting subject.
updated (optional): Last time, specified in UTC, that the meetingSubject element was updated.
meetingLocation: A child element of the state element. This represents the location of the calendar meeting. This element is specific to calendarState and aggregateState instance types. It MAY have the following attributes:
LCID (optional): Locale identifier for the meeting location.
updated (optional): Last time, specified in UTC, that the meetingLocation element was updated.
timeZoneBias: A child element of the state element. The value of this element is the difference in minutes between UTC and local time, either standard time or daylight saving time, of the publisher.
timeZoneName: A child element of the state element. The value of this element contains the name or description for the time zone, either standard time or daylight saving time, of the publisher.
timeZoneAbbreviation: A child element of the state element. The value of this element contains the abbreviation for the time zone, either standard time or daylight saving time, of the publisher.
device: A child element of the state element. This identifies the type of the endpoint device. It SHOULD<4> have one of the following values:
computer: Endpoint is the computer desktop.
deskphone: Endpoint is the phone device.
mobile: Endpoint is the mobile device.
web: Endpoint is the web browser.
treatLocationAsProximate: A child element of the state element. This element is specific to machineState. The value of this element specifies whether location information in this machineState category instance is treated as proximately and is used only when user is not available in any other endpoints.