calendarData/calendarInfo

Developers
2009-09-18
2013-03-28
1 2 > >> (Page 1 of 2)
  • pier eleven

    pier eleven - 2009-09-18

    If you ever interested what that long AAAAAAAAAAAAAAA in calendar data means, like here (OC2007):
    <calendarData xmlns="http://schemas.microsoft.com/2006/09/sip/calendarData" mailboxID="bob@contoso.com">
      <freeBusy startTime="2007-10-27T07:00:00Z" granularity="PT15M"     encodingVersion="1">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVAABVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqgAAAAAAVQAA</freeBusy>
    </calendarData>

    or here (OC2005):
    <calendarInfo mailboxId="/o=Dimension Data/ou=EU/cn=Recipients/cn=Wim.Vanhalewijck" startTime="2009-09-14T06:15:00Z" granularity="PT15M" >qKqqqqqqqqoqAAAAAAAAAAAAAAAAAAAAqKqqqqqqqqoqAAAAAAAAAAAAAAAAAAAAqKqqqqqqqqoqAAAAAAAAAAAAAAAAAAAAqKqqqqqqqqoqAAAAAAAAAAAAAAAAAAAA</calendarInfo>

    This is an answer:
    http://msdn.microsoft.com/en-us/library/dd941537%28office.13%29.aspx

    We likely need to adjust buddy's status accordingly.
    Unfortunately I miss integration with Outlook to check this theory.

     
  • Stefan Becker

    Stefan Becker - 2009-09-18

    Interesting. So OCS provides the calendar information? That would be really cool for the buddy popup :-)

     
  • Stefan Becker

    Stefan Becker - 2009-09-18

    Sorry, forgot to mention that OCS server already changes the status for users based on the calendar data. So if a user is currently marked as "busy" in the Exchange calendar he will show up automatically as busy in OCS.

    I think what you could do with the Calendar info would be to provide something like "will be free in X minutes…" in the buddy info popup.

     
  • pier eleven

    pier eleven - 2009-09-18

    As far as I know, Communicator through Outlook (MAPI) ask Exchange (server) for own Calendar Information and then publish it itself. For 2007 in 'calendarData' category and to appropriate container(s). So subscribers will know about user Calendar information. The same way would be published Meeting Subject and Meeting Location (these will be available to Team-access-level members).

    We as subscribers of 'calendarData' category should receive all this user's information. Similar concept for 2005 systems (ss you may check in logs of our CSTA(telephony) user).

    (What I don't quite get, why Communications Server can not take this info from Exchange itself. (Maybe that's for offline - out of enterprise - clients whose Calendar located locally…) And another - what's the point for us to have user's Calendar data - the user could change it's state according to his own calendar and we'd receive it's status update by regular means - by subscription.) Anyway, this is how its work (seems).

     
  • pier eleven

    pier eleven - 2009-09-18

    for 2005, but anyway

    "Communicator automatically changes your presence status to reflect the schedule that is saved in your Outlook calendar, what you are doing on your computer, and whether you are on the phone. It can also automatically set your presence status to Away when your computer is idle for a specified period of time. You can also change your presence status information manually.

    Unless your presence status is shown as **In a Meeting**, **Out of Office**, or **Appear Offline**, Communicator automatically resets your presence status to **Online** as soon as activity is detected on your computer, as long as your calendar shows your time as free. In addition, when you are on the phone or are engaged in a voice or video conversation, your presence status changes to **In a Call**. When you are in a multiparty conversation—using the phone, or while using voice, video, or application sharing—your presence status changes to **In a Conference**."

    http://office.microsoft.com/en-gb/communicator/HP011800211033.aspx

     
  • Stefan Becker

    Stefan Becker - 2009-09-18

    You are of course correct: Communicator is changing the users state, not OCS. Otherwise I would see automatic busy from OCS for myself and other pidgin-sipe users. But I only see this happening for M$ Communicator users.

     
  • pier eleven

    pier eleven - 2009-09-18

    right, you should receive something like:

    <**category** …>
    <**activity** token="**in-a-meeting**" minAvailability="6500" maxAvailability="8999"></activity>
    <**meetingSubject**>Customer Meeting</meetingSubject>
    <**meetingLocation**>Conf Room 100</meetingLocation>

    Do you receive something similar from your contacts that scheduled their meetings in Outlook and participating in them in the moment?

     
  • pier eleven

    pier eleven - 2009-09-18

    agreed, that CalendarData should be used to show **future** availability of the contact, e.g. in status:

    Status: busy. Free at 3:00PM

    http://communicatorteam.com/photos/oc_blog_pics/images/52/original.aspx

    (The current availability contacts deliver themselves based on their schedules.)

     
  • pier eleven

    pier eleven - 2009-09-18

    We'd also need status "**In a meeting**" as in screenshot in link above. (Not manually settable).

    As well as **'Meeting in:'** and **'Meeting about:** fields in buddy's tooltip.

     
  • pier eleven

    pier eleven - 2009-09-18

    another similar aspect of using Calendar Data is to show span of availability, like:

    Free until 14:15

    Status: available until 14:15

     
  • pier eleven

    pier eleven - 2009-09-19

    Well, may be that extra statuses are driven by calendar data in 2005 system (as above), but 2007 systems has special activity field for that :

    <xs:simpleType name="activityTokenTypeEnum"> <xs:restriction base="xs:token"> <xs:enumeration value="on-the-phone"/> <xs:enumeration value="in-a-conference"/> <xs:enumeration value="in-a-meeting"/> <xs:enumeration value="**out-of-office**"/> <xs:enumeration value="urgent-interruptions-only"/> </xs:restriction> </xs:simpleType>

     
  • pier eleven

    pier eleven - 2009-12-04

    I think the following Exchange 2007/2010 Web Service can be used to obtain our own FreeBusy data for subsequent publications to OCS in calendar category. This would be an interoperable solution and the same code on all platforms. Presuming user will update it's calendar in Exchange server by means of Evolution/MAPI for example on non-Windows platforms.

    [] : **Availability Web Service Protocol Specification** - from Exchange Server Protocol Documents

    are usage examples of **GetUserAvailability** Operation.

    I need to figure out yet how authentication is applyed to the web services calls.

    Location of the service can be figured out using Autodiscovery the same way as Outlook 2007 and Communicator 2007 do. That's HTTPS call to predefined URL in user's domain.

      : http://msdn.microsoft.com/en-us/library/cc463891.aspx
      : http://msdn.microsoft.com/en-us/library/cc425499.aspx

     
  • pier eleven

    pier eleven - 2009-12-04

    From the spec:

    "**Security and Authentication Methods**: This protocol relies on the Web server that is hosting it to perform authentication."

    I.e. it should be traditional Kerberos/NTLM (or(?) SPNEGO) HTTP authentication negotiations.

     
  • pier eleven

    pier eleven - 2009-12-05

    Exchange related specs: 

    **: Autodiscover HTTP Service Protocol Specification** 
    Defines how to find URIs of Autodiscover server. The ways are: 
    - search for LDAP entry; 
    - DNS SRV record: \_autodiscover._tcp.<domain> 
    - HTTP GET redirect from: "http://Autodiscover.{domain}/Autodiscover/Autodiscover.xml" 
    - add these: "https://Autodiscover.{domain}/Autodiscover/Autodiscover.xml" and "https://{domain}/Autodiscover/Autodiscover.xml"

    **: Autodiscover Publishing and Lookup Protocol Specification** 
    By submitting by HTTP POST specially formatted XML request containing email address in question, we can obtain URIs of: Availability service (for Free/Busy), OOF (Out of Office) service and OAB (Offline Address Book) service in XML response. 
    Examples for Availability, OOF and OAB respectively: 

        <ASUrl>https://machine.domain.Contoso.com/EWS/Exchange.asmx</ASUrl
        <OOFUrl>https://machine.domain.Contoso.com /EWS/Exchange.asmx</OOFUrl> 
        <OABUrl>http://machine.domain.Contoso.com /OAB/8706ac4e-cde7-4d08-a23f-9d6be9b58f04/</OABUrl>

     
  • pier eleven

    pier eleven - 2009-12-07

    Here is HTTP POST request (actually web services call) I've constructed to Availability server's URI (https://{server}/EWS/Exchange.asmx in my case):

    Important bits are:  
    - email address,  
    - start/end time,  
    - interval 
    -  timezone (we should publish our freebusy in UTC).

        <?xml version="1.0" encoding="utf-8"?>
        <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
                       xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
          <soap:Body>
            <GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                        xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
              <t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
                <Bias>0</Bias>
                <StandardTime>
                  <Bias>0</Bias>
                  <Time>02:00:00</Time>
                  <DayOrder>5</DayOrder>
                  <Month>10</Month>
                  <DayOfWeek>Sunday</DayOfWeek>
                </StandardTime>
                <DaylightTime>
                  <Bias>-60</Bias>
                  <Time>02:00:00</Time>
                  <DayOrder>1</DayOrder>
                  <Month>4</Month>
                  <DayOfWeek>Sunday</DayOfWeek>
                </DaylightTime>
              </t:TimeZone>
              <MailboxDataArray>
                <t:MailboxData>
                  <t:Email>
                    <t:Address>alice@cosmo.local</t:Address>
                  </t:Email>
                  <t:AttendeeType>Required</t:AttendeeType>
                  <t:ExcludeConflicts>false</t:ExcludeConflicts>
                </t:MailboxData>
              </MailboxDataArray>
              <t:FreeBusyViewOptions>
                <t:TimeWindow>
                  <t:StartTime>2009-12-06T00:00:00</t:StartTime>
                  <t:EndTime>2009-12-09T23:59:59</t:EndTime>
                </t:TimeWindow>
                <t:MergedFreeBusyIntervalInMinutes>15</t:MergedFreeBusyIntervalInMinutes>
                <t:RequestedView>DetailedMerged</t:RequestedView>
              </t:FreeBusyViewOptions>
            </GetUserAvailabilityRequest>
          </soap:Body>
        </soap:Envelope>

    The result contains all the needed information for subsequent publishing: 
    - *FreeBusy* string (see MergedFreeBusy; it should be converted to binary stream and then base64 encoded), 
    - *Working Hours* with Timezone, 
    - *Meeting Subject* and *Meeting Location* with start/end time. These would be published separately when meeting start along with appropriate busy status. 

    **Anybody willing to implement it?**

        <?xml version="1.0" encoding="utf-8"?>
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <soap:Header>
            <t:ServerVersionInfo xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" MajorVersion="8" MinorVersion="2" MajorBuildNumber="176" MinorBuildNumber="2"/>
          </soap:Header>
          <soap:Body>
            <GetUserAvailabilityResponse xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
              <FreeBusyResponseArray>
                <FreeBusyResponse>
                  <ResponseMessage ResponseClass="Success">
                    <ResponseCode>NoError</ResponseCode>
                  </ResponseMessage>
                  <FreeBusyView>
                    <FreeBusyViewType xmlns="http://schemas.microsoft.com/exchange/services/2006/types">DetailedMerged</FreeBusyViewType>
                    <MergedFreeBusy xmlns="http://schemas.microsoft.com/exchange/services/2006/types">000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000222200000000000000000000000000000000000000</MergedFreeBusy>
                    <CalendarEventArray xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
                      <CalendarEvent>
                        <StartTime>2009-12-07T13:30:00</StartTime>
                        <EndTime>2009-12-07T14:30:00</EndTime>
                        <BusyType>Busy</BusyType>
                        <CalendarEventDetails>
                          <ID>00000000306449E1C946C84799E9C77441701CAF070010565CC31D2C2D42A0DF7CFABDE3D83900005B0A983E0000A16EF4AF06A3D54C97CE395D706FE6CA00005B0E06080000</ID>
                          <Subject>Lunch</Subject>
                          <Location>Cafe</Location>
                          <IsMeeting>false</IsMeeting>
                          <IsRecurring>true</IsRecurring>
                          <IsException>false</IsException>
                          <IsReminderSet>true</IsReminderSet>
                          <IsPrivate>false</IsPrivate>
                        </CalendarEventDetails>
                      </CalendarEvent>
                      <CalendarEvent>
                        <StartTime>2009-12-08T13:30:00</StartTime>
                        <EndTime>2009-12-08T14:30:00</EndTime>
                        <BusyType>Busy</BusyType>
                        <CalendarEventDetails>
                          <ID>00000000306449E1C946C84799E9C77441701CAF070010565CC31D2C2D42A0DF7CFABDE3D83900005B0A983E0000A16EF4AF06A3D54C97CE395D706FE6CA00005B0E06080000</ID>
                          <Subject>Lunch</Subject>
                          <Location>Cafe</Location>
                          <IsMeeting>false</IsMeeting>
                          <IsRecurring>true</IsRecurring>
                          <IsException>false</IsException>
                          <IsReminderSet>true</IsReminderSet>
                          <IsPrivate>false</IsPrivate>
                        </CalendarEventDetails>
                      </CalendarEvent>
                      <CalendarEvent>
                        <StartTime>2009-12-09T13:30:00</StartTime>
                        <EndTime>2009-12-09T14:30:00</EndTime>
                        <BusyType>Busy</BusyType>
                        <CalendarEventDetails>
                          <ID>00000000306449E1C946C84799E9C77441701CAF070010565CC31D2C2D42A0DF7CFABDE3D83900005B0A983E0000A16EF4AF06A3D54C97CE395D706FE6CA00005B0E06080000</ID>
                          <Subject>Lunch</Subject>
                          <Location>Cafe</Location>
                          <IsMeeting>false</IsMeeting>
                          <IsRecurring>true</IsRecurring>
                          <IsException>false</IsException>
                          <IsReminderSet>true</IsReminderSet>
                          <IsPrivate>false</IsPrivate>
                        </CalendarEventDetails>
                      </CalendarEvent>
                    </CalendarEventArray>
                    <WorkingHours xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
                      <TimeZone>
                        <Bias>0</Bias>
                        <StandardTime>
                          <Bias>0</Bias>
                          <Time>02:00:00</Time>
                          <DayOrder>5</DayOrder>
                          <Month>10</Month>
                          <DayOfWeek>Sunday</DayOfWeek>
                        </StandardTime>
                        <DaylightTime>
                          <Bias>-60</Bias>
                          <Time>01:00:00</Time>
                          <DayOrder>5</DayOrder>
                          <Month>3</Month>
                          <DayOfWeek>Sunday</DayOfWeek>
                        </DaylightTime>
                      </TimeZone>
                      <WorkingPeriodArray>
                        <WorkingPeriod>
                          <DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek>
                          <StartTimeInMinutes>540</StartTimeInMinutes>
                          <EndTimeInMinutes>1080</EndTimeInMinutes>
                        </WorkingPeriod>
                      </WorkingPeriodArray>
                    </WorkingHours>
                  </FreeBusyView>
                </FreeBusyResponse>
              </FreeBusyResponseArray>
            </GetUserAvailabilityResponse>
          </soap:Body>
        </soap:Envelope>

    **Tip**: 
    I used *Poster* plugin for Firefox to send the request by POST method (essential).  
    Also "*Tamper Data*" plugin for Firefox is indispecible for checking HTTP headers. Similar plugin for IE is *ieHTTPHeaders*.

     
  • pier eleven

    pier eleven - 2009-12-09

    "**Availability Service API** 
    The Availability service is part of the Exchange 2010 programming interface. It is available as a Web service to allow developers to write **third-party tools** for integration purposes."

    I feel like approved to use the web service :))

      : http://technet.microsoft.com/en-us/library/bb232134%28EXCHG.140%29.aspx

     
  • Jochen De Smet

    Jochen De Smet - 2009-12-10

    Do you have an example of the calendarData XML ? I need the namespaces (if any) as usual in libsipe.

     
  • pier eleven

    pier eleven - 2009-12-10

    At work only unfortunately for 2007 servers.
    Bur look at  page 115. They have tons of this stuff.

     
  • Jochen De Smet

    Jochen De Smet - 2009-12-12

    I'm getting this after applying some of the calendar patches to libsipe:

    cc1: warnings being treated as errors
    sipe-cal.c: In function 'sipe_cal_get_description':
    sipe-cal.c:57: warning: comparison between signed and unsigned

    which is a compare between and int and a gzise.

     
  • pier eleven

    pier eleven - 2009-12-13

    keep merging :) Stefan has committed some patches couple of commits ahead about this.

    I compile on windows with gcc 3.4.5 and do not have such warnings…

     
  • pier eleven

    pier eleven - 2009-12-16

    For record, timezone definition without daylight savings (Tokyo, GMT+9):  
    We will likely need similar definition for UTC (GMT) timezone in our request to EWS's Availability service.

        <?xml version="1.0"?>
        <WorkingHours xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/calendarData" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
          <TimeZone>
            <Bias>-540</Bias>
            <StandardTime>
              <Bias>0</Bias>
              <Time>00:00:00</Time>
              <DayOrder>0</DayOrder>
              <Month>0</Month>
              <DayOfWeek>Sunday</DayOfWeek>
            </StandardTime>
            <DaylightTime>
              <Bias>0</Bias>
              <Time>00:00:00</Time>
              <DayOrder>0</DayOrder>
              <Month>0</Month>
              <DayOfWeek>Sunday</DayOfWeek>
            </DaylightTime>
          </TimeZone>
          <WorkingPeriodArray>
            <WorkingPeriod>
              <DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek>
              <StartTimeInMinutes>540</StartTimeInMinutes>
              <EndTimeInMinutes>1080</EndTimeInMinutes>
            </WorkingPeriod>
          </WorkingPeriodArray>
        </WorkingHours>

     
  • pier eleven

    pier eleven - 2009-12-17

    This is for Sydney/Australia - South hemisphere where Daylight Savings time is now.

        <?xml version="1.0"?>
        <WorkingHours xmlns:auto-ns1="http://schemas.microsoft.com/2006/09/sip/calendarData" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
          <TimeZone>
            <Bias>-600</Bias>
            <StandardTime>
              <Bias>0</Bias>
              <Time>03:00:00</Time>
              <DayOrder>1</DayOrder>
              <Month>4</Month>
              <DayOfWeek>Sunday</DayOfWeek>
            </StandardTime>
            <DaylightTime>
              <Bias>-60</Bias>
              <Time>02:00:00</Time>
              <DayOrder>1</DayOrder>
              <Month>10</Month>
              <DayOfWeek>Sunday</DayOfWeek>
            </DaylightTime>
          </TimeZone>
          <WorkingPeriodArray>
            <WorkingPeriod>
              <DayOfWeek>Monday Tuesday Wednesday Thursday Friday</DayOfWeek>
              <StartTimeInMinutes>540</StartTimeInMinutes>
              <EndTimeInMinutes>1080</EndTimeInMinutes>
            </WorkingPeriod>
          </WorkingPeriodArray>
        </WorkingHours>

    The resulting TZ string is (after fix yet to commit): 

        TST-10TDT-11,M10.1.0/02:00:00,M4.1.0/03:00:00

    But seems mingw gives bad help using(?) window's  function which can only parse beginning of TZ variable:

        TZ=tznhh[:mm ]

    like TZ=GST-1GDT, no further. So Daylight Savings seems does not work on windows :(

      : http://msdn.microsoft.com/en-us/library/90s5c885%28VS.80%29.aspx

     
  • pier eleven

    pier eleven - 2009-12-18

    created manual timezone calculations in git. At least the same code for all platforms. Plus dynamic timezones.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.