【问题标题】:Ucma4 Delayed Response when using PresenceServices BeginPresenceQuery使用 PresenceServices BeginPresenceQuery 时的 Ucma4 延迟响应
【发布时间】:2016-01-16 16:49:01
【问题描述】:

在测试机上,向 FRONT END 发送请求时,我得到了很好的响应(两秒)。 在生产中,请求需要 30 秒或更长时间,组织有 5000 多个用户。 如果有另一个使用 UCMA 获取 SIP 状态的方法? UCWA 无法使用。 有什么想法吗?

代码:

public Dictionary<string, string> GetAgentsAvailability(List<string> usersUris)
{
    lock (lockObj)
    {
        AgentsAvailability = new Dictionary<string, string>();
        try
        {
            if (usersUris != null && usersUris.Count > 0)
            {
                IAsyncResult agentAvailabilityCheck = ApplicationEndPoint.PresenceServices.BeginPresenceQuery(usersUris, new string[] { "state" },null, null);
                WaitHandle[] w = new WaitHandle[] { agentAvailabilityCheck.AsyncWaitHandle };
                WaitHandle.WaitAll(w, 3000);
           }
            else
            {
                WriteEntry.ELog("Platform - GetAgentsAvailability - No Agent SIPs to check.", EventLogEntryType.Information);
            }
        }
        catch (Exception ex)
        {
            WriteEntry.ELog(ex.ToString(), EventLogEntryType.Error);
            throw;
        }
        return AgentsAvailability;
    }
}

【问题讨论】:

    标签: lync-2013 ucma


    【解决方案1】:

    对于如此大量的用户,我建议使用状态订阅来通知您当前状态和状态变化,而不是尝试一次检查所有用户的状态。

    有关使用 Presence 和 Groups 的更多详细信息,请参阅以下 Microsoft 文章https://msdn.microsoft.com/en-us/library/office/hh456406(v=office.14).aspx

    上面的链接有很多内容,但您所追求的功能以RemotePresenceView 类为中心。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-02
      • 1970-01-01
      • 2017-01-31
      • 1970-01-01
      • 2012-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多