2.2.2.7.8 calendarData

A calendarData category instance contains calendar information for a user, such as a free busy time slots, and working hours that are used for call routing and shared with subscribers.

The following examples illustrate the format of a calendarData category instance:

     <calendarData xmlns="http://schemas.microsoft.com/2006/09/sip/calendarData"       mailboxID="bob@contoso.com">
       <WorkingHours 
           xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
         <TimeZone>
           <Bias>480</Bias>
           <StandardTime>
             <Bias>0</Bias>
             <Time>02:00:00</Time>
             <DayOrder>1</DayOrder>
             <Month>11</Month>
             <DayOfWeek>Sunday</DayOfWeek>
           </StandardTime>
           <DaylightTime>
             <Bias>-60</Bias>
             <Time>02:00:00</Time>
             <DayOrder>2</DayOrder>
             <Month>3</Month>
             <DayOfWeek>Sunday</DayOfWeek>
           </DaylightTime>
         </TimeZone>
         <WorkingPeriodArray>
           <WorkingPeriod>
             <DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek>
             <StartTimeInMinutes>480</StartTimeInMinutes>
             <EndTimeInMinutes>1020</EndTimeInMinutes>
           </WorkingPeriod>
         </WorkingPeriodArray>
       </WorkingHours>
     </calendarData>
  
     <calendarData 
           xmlns="http://schemas.microsoft.com/2006/09/sip/calendarData"        mailboxID="bob@contoso.com">
       <freeBusy 
           startTime="2009-10-22T07:00:00Z" 
           granularity="PT15M" encodingVersion="1">
       </freeBusy>
     </calendarData>

Elements and attributes are defined in this section. For the full XML schema, see section 7.

The XML elements of a calendarData document MUST conform to the schema defined in section 7.8.

  • calendarData: This is a root element of the calendarData category instance. A calendarData element consists of a sequence of zero or one WorkingHours or freeBusy element. The calendarData element has the following attributes:

    • majorVersion (optional): Major version of calendar data format.

    • minorVersion (optional): Minor version of the calendar data format.

    • mailboxID (required): SMTP address of the user’s mailbox.

  • WorkingHours: Contains an array of working hours in a given time zone. This is the subelement of the calendarData element.

  • TimeZone: This element specifies a time-zone time. This is a subelement of the WorkingHours element.

  • Bias: This element specifies time zone offset, representing the difference in minutes between the local time in this time zone and the UTC. This is the subelement of the TimeZone element.

  • StandardTime: This element specifies a time-zoned time, representing the date and time in the contained time zone when time changes over to standard time. This is the subelement of the TimeZone element.

  • DaylightTime: This element specifies time-zone time, representing the date and time in this time zone when time changes over to daylight time in the current year for Daylight Saving Time. This is a subelement of the TimeZone element.

  • Bias: The time offset in minutes from the Bias value set on the parent TimeZone element to account for standard time or day light time in this time zone. This is a subelement of DaylightTime and StandardTime elements.

  • Time: Specifies the time in the given time zone. This is a subelement of DaylightTime and StandardTime elements.

  • DayOrder: This element specifies the day number of a month. This is a subelement of DaylightTime and StandardTime elements.

  • Month: This element specifies the month number of a time. This is a subelement of DaylightTime and StandardTime elements.

  • DayOfWeek: This element specifies the day of week. This is a subelement of DaylightTime and StandardTime elements.

  • WorkingPeriodArray: This element contains an array of WorkingPeriod elements. This is a subelement of WorkingHours element.

  • WorkingPeriod: This element specifies the working period details. This is a subelement of WorkingPeriodArray element.

  • DayOfWeek: This element specifies the day of a week. This is a subelement of the WorkingPeriod element. The value of this element is a string composed of one or more of the following words:

    • Sunday

    • Monday

    • Tuesday

    • Wednesday

    • Thursday

    • Friday

    • Saturday

    • Day

    • Weekday

    • WeekendDay

  • StartTimeInMinutes: This element contains the start time of each workday after midnight in minutes. This is the subelement of the WorkingPeriod element.

  • EndTimeInMinutes: This element contains the end time of each workday after midnight in minutes. This is the subelement of WorkingPeriod element.

  • freeBusy: This element contains consecutive calendar blocks, showing free-busy intervals of a specified duration from a specified starting time. This is a subelement of calendarData element. The value of this element, is a base64 encoded string on the stream of binary bits. The interpretation of the binary bits differs for different calendarData category instance:

If the two most significant bits of the instance ID value are "00":

Every 2 bits represent a calendar block of the duration defined by the granularity value in minutes. Data starts from the given startTime in UTC. Calendar block types are encoded as follows:

  • 00, Free (Fr)

  • 01, Tentative (Te)

  • 10, Busy (Bu)

  • 11, Out of facility (Oo)

    For example, the startTime attribute value can be "2007-09-01T00:00:00Z". A granularity value of "PT15M" shows calendar blocks as fifteen-minute intervals. If the calendar blocks in are in the following order:

     FrFrFrFrFrBuBuBuBuTeTeTeTeOoOoOoOoFrFr 
    

    This corresponds to the following bit stream:

    00000000001010101001010101111111110000

If the two most significant bits of the instance ID value are 01:<24>

The first byte contains the maximum number of free/busy states. States are encoded as follows:

  • 0, Free

  • 1, Tentative

  • 2, Busy

  • 3, Out of facility

  • 4, Working elsewhere

  • 5-255, reserved for future use.

    Next, it’s a bytes array and the size of the array equals to the maximum number of free/busy states minus five. This array is used as a fallback map: if a newer free/busy state cannot be interpreted, it is interpreted as the value in the corresponding entry in the fallback map; the index to be used is the number of the state minus five. The value in any position will be less than the index plus five to ensure the fallback will only happen from a newer state to an older state.

    Next, it’s the bit stream containing the actual free/busy data. It SHOULD contain 384 entries and each entry represents a calendar block of the duration defined by the granularity value in minutes. The width of each entry MUST be the smallest width possible to hold the maximum number of the free/busy states. Data starts from the given startTime in UTC.

    For example, the startTime attribute value can be "2007-09-01T00:00:00Z". A granularity value of "PT15M" shows calendar blocks as fifteen-minute intervals. If the calendar blocks in are in the following order:

     Free Free Busy Busy Tentative Tentative Oof Oof WorkingElsewhere Free
    

    This corresponds to the following bit stream:

     000000010010001001011011100000 
    

The free-busy data shown by the value of a freeBusy element is the base64 encoded value of the preceding binary bits.

This element has the following attributes:

  • startTime (required): Starting time expressed in UTC.

  • granularity (required): Duration of time slots in minutes showing free or busy on calendar.

  • encodingVersion (required): Encoding version number of free busy data.