【问题标题】:Using Microsoft's EWS to create online Lync/Skype meeting使用 Microsoft 的 EWS 创建在线 Lync/Skype 会议
【发布时间】:2017-11-14 03:26:49
【问题描述】:

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

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

这是我的会议代码 sn-p(calendarView 已经用开始日期、结束日期等进行了初始化):

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(经过测试 - 在变量 activeResults 中创建了与 Outlook 的在线和定期会议),但我不知道从哪里获取会议链接和加入会议所需的其他 Lync/Skype 属性。

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

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

【问题讨论】:

    标签: c# outlook exchangewebservices skype lync


    【解决方案1】:

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

    1. 下载程序link
    2. 构建并运行它
    3. 会话 - 登录 - 选择您的邮件配置文件 - 选择邮箱并双击
    4. 动作-打开特殊文件夹-日历-双击日历
    5. 使用在线 S4B/Lync 会议打开项目
    6. UC* 属性是我正在寻找的属性。

    如果您打开该属性,您会在顶部看到类似这样的内容:

    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 个属性。

    所以定义应该是:

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

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

    1. 访问ValueExtendedProperties
    2. 致电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) 属性。

    【讨论】:

    • 你能帮我解决这个问题吗?如何将 Skype 会议链接添加到我使用 EWS 创建的新会议邀请中?
    • 嗨@Ian 发布一个包含更多信息的问题,我或其他人会尽力提供帮助。
    • 在 StackOverflow 上有很多关于这个主题的问题。但是,我觉得这是解决我的问题的可能方法。基本上我想创建一个 Skype 链接并将其添加到 Outlook 会议。我对此进行了研究,发现我们需要使用其他 api 来执行此操作。
    • 是的,您需要调用 LWS (Lync Web Services) 以获取会议信息,然后您可以将其附加到会议正文并使用 EWS 创建它
    • 这就是我卡住的地方,不知道怎么办。
    【解决方案2】:

    好的,我通过设置一个扩展属性(几乎!)设法让这个工作(几乎!):

    appointment.SetExtendedProperty(
                    new ExtendedPropertyDefinition(
                        new Guid("00020329-0000-0000-C000-000000000046"),
                        "OnlineMeetingExternalLink",
                        MapiPropertyType.String
                        ),
                    skypeMeeting.JoinUrl
                    );
    

    我说几乎是因为当您在 Outlook 中打开约会时,约会看起来与 Skype 会议不完全一样:没有加入链接和电话号码等的页脚。 也许还有其他差异,但现在我们在 Skype for business 中看到它带有加入按钮,并且我们在 Outlook 提醒中看到它带有加入按钮。 作为一种解决方法,我们必须对约会的正文内容进行硬编码。 还有会议ID,可以使用UCWA 2.0 (https://docs.microsoft.com/en-us/skype-sdk/ucwa/myonlinemeetings_ref)

    我们使用 UCWA 2.0 创建 Skype 电话会议并将其附加到 EWS 约会对象。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多