使用Microsoft的EWS创建在线Lync/Skype会议 [英] Using Microsoft's EWS to create online Lync/Skype meeting

查看:191
本文介绍了使用Microsoft的EWS创建在线Lync/Skype会议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何使用EWS通过在线会议(Lync/Skype)创建会议请求吗?

Anybody knows how to create meeting request with online conference(Lync/Skype) using EWS?

因此,我的方法是首先通过Outlook创建一个在线定期会议,然后模拟具有相同属性的事件的创建.

So my approach is first getting an online and regular meeting created via Outlook and then simulate the creation of event with the same property.

这是我参加会议的代码片段(calendarView已经用开始日期,结束日期等进行了初始化):

Here is my code snippet for getting the meeting (calendarView is already initialized with start date, end date etc.):

ExtendedPropertyDefinition extendedOnlineMeetingProperty =
                new ExtendedPropertyDefinition(new Guid("{00062008-0000-0000-c000-000000000046}"), 34112,
                    MapiPropertyType.Integer);

var properties = new PropertySet(
            ItemSchema.Id,
            AppointmentSchema.ICalUid,
            ItemSchema.Subject,
            AppointmentSchema.Start,
            AppointmentSchema.End,
            AppointmentSchema.Organizer,
            AppointmentSchema.Location,
            AppointmentSchema.LegacyFreeBusyStatus,
            AppointmentSchema.IsCancelled,
            AppointmentSchema.ICalRecurrenceId,
            AppointmentSchema.MyResponseType, // Mandatory Meeting.MyResponseType can be retrieved without a search in the participant list
            ItemSchema.LastModifiedTime,
            AppointmentSchema.IsOnlineMeeting,
            AppointmentSchema.IsMeeting,
            ItemSchema.DisplayTo) { };

 properties.Add(extendedOnlineMeetingProperty);


var activeResults = service.FindAppointments(WellKnownFolderName.Calendar, calendarView).ToList();
    if (activeResults.Count > 0)
    {
        service.LoadPropertiesForItems(activeResults, properties);
    }

我获得的属性IsOnlineMeeting具有正确的bool值(经过测试- 在变量activeResults中使用Outlook创建的在线和常规会议),但我不知道从何处获取会议链接以及加入会议所需的其他Lync/Skype属性.

I got the property IsOnlineMeeting with the correct bool value (tested - created online and regular meeting with Outlook) in variable activeResults but I do not understand where to get conference link and other Lync/Skype properties needed for joining a conference.

我也不知道在哪里以及如何分配Lync/Skype会议URL的值和其他属性.

Also I am not sure where and how to assign the values of Lync/Skype conference URL and other properties.

有时我会问自己,基于MS产品开发一些应用程序是否值得,因为它们的文档很烂.

Sometimes I ask myself if it's worth it to developed some app based on MS products since their documentation suck.

推荐答案

诅咒MS一周后,我找到了解决方案.使用MFCMAPI工具,您可以检查邮箱中的项目具有哪些属性及其值.

After one week of cursing MS I have found a solution. Using the tool MFCMAPI you can check what property and their values your item in mailbox have.

  1. 下载程序链接
  2. 构建并运行它
  3. 会话-登录-选择您的邮件配置文件-选择邮箱并双击
  4. 操作-打开特殊文件夹-日历-双击日历
  5. 通过在线S4B/Lync会议打开项目
  6. UC *属性是我一直在寻找的属性.
  1. download the program link
  2. build and run it
  3. Session - Logon - choose your mail profile - pick the mailbox and double click
  4. actions - open special folder - calendar - double click on calendar
  5. open the item with online S4B/Lync conference
  6. the UC* properties are the one I was looking for.

如果打开该属性,您会在顶部看到以下内容:

If you open the property you can see something like this on the top:

ag: 0x8096001E
Type: PT_STRING8
DASL: http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/UCMeetingSetting
Named Prop Name: UCMeetingSetting
Named Prop Guid: {00020329-0000-0000-C000-000000000046} = PS_PUBLIC_STRINGS

所以我对扩展属性的定义是错误的.它不仅是一个属性,而且实际上您需要全部7个属性.

So my definition of the extended property was wrong. It is not only one property but actually you need all 7 of them.

因此定义应为:

private static ExtendedPropertyDefinition CreateOnlineMeetingProperty()
        {
            ExtendedPropertyDefinition extendedUCMeetingSetting =
                new ExtendedPropertyDefinition(new Guid("{00020329-0000-0000-C000-000000000046}"), "UCMeetingSetting",
                    MapiPropertyType.String);

            return extendedUCMeetingSetting;
        }

使用正确的扩展定义,您可以轻松地从项目中获取值.

With the correct extended definition you can get the values from the item easily.

  1. 访问ExtendedPropertiesValue
  2. 呼叫TryGetProperty
  1. accessing the Value of ExtendedProperties
  2. Calling TryGetProperty

var activeResults = service.FindAppointments(new
FolderId(WellKnownFolderName.Calendar, resource.Email),calendarView).ToList();

service.LoadPropertiesForItems(activeResults, properties);

foreach (Appointment result in activeResults)
{
// 1.
var b = result.ExtendedProperties[1].Value;
// 2.
string UCMeetingSetting;
result.TryGetProperty(extendedUCMeetingSetting, out UCMeetingSetting);
}

使用上述步骤,您可以获得所需的任何扩展属性,而不仅仅是统一通信(UC)属性.

using steps above you can get whatever extended property you want, not only Unified Communications (UC) properties.

这篇关于使用Microsoft的EWS创建在线Lync/Skype会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆