【问题标题】:Establish UserEndpoint without Credentials in UCMA 4在 UCMA 4 中建立没有凭据的 UserEndpoint
【发布时间】:2014-10-14 08:29:02
【问题描述】:

如何在没有凭据的情况下建立 UserEndpoint?我在某处读到,如果应用程序/应用程序服务器受到 Lync 服务器的信任,它应该是可能的。情况就是这样,但它似乎不起作用。我总是得到异常

没有为领域找到匹配的凭据。

【问题讨论】:

    标签: c# lync ucma


    【解决方案1】:

    首先使用ProvisionedApplicationPlatformSettings设置CollaborationPlatform:

    ProvisionedApplicationPlatformSettings settings = new ProvisionedApplicationPlatformSettings("UCMA 4", _appID);
    CollaborationPlatform  _collabPlatform = new CollaborationPlatform(settings);
    _collabPlatform.RegisterForApplicationEndpointSettings(this.Platform_ApplicationEndpointOwnerDiscovered);
    // Initialize and start-up the platform.
    _collabPlatform.BeginStartup(EndPlatformStartup, _collabPlatform);
    

    然后在Platform_ApplicationEndpointOwnerDiscovered 回调方法中设置您的应用程序端点。然后一旦完成,您就可以调用此方法并在没有凭据的情况下设置 UserEndpoint:

    Use this method to create UserEndpoint
    private UserEndpoint CreateUserEndpoint(CollaborationPlatform  _collabPlatform, String _SIP)
    {
        try
        {
            UserEndpointSettings _settings = new UserEndpointSettings(_SIP, _serverFqdn);
            _settings.SupportedMimePartContentTypes = new ContentType[] { new ContentType("text/html"), new ContentType("text/plain") };
            _settings.AutomaticPresencePublicationEnabled = true;
            UserEndpoint _userEndpoint = new UserEndpoint(_collabPlatform, _settings);
            _userEndpoint.EndEstablish(_userEndpoint.BeginEstablish(null, null));
    
            return _userEndpoint;
        }
        catch (Exception exx)
        {
            Console.WriteLine("\n" + _SIP + "CreateUserEndpoint : " + exx);
            return null;
        }
    }       
    

    【讨论】:

      【解决方案2】:

      不确定是否要在没有凭据的情况下建立用户端点,但如果有帮助,您绝对可以在已建立的对话中模拟一个用户端点。

      只需检查会话类上的 Impersonate 方法即可。

      【讨论】:

      • 问题是我需要解决this 问题。我需要为(所有)用户接听所有来电,而不是创建新对话。所以我想我需要一个 UserEndpoint 吗?
      • 好的,我想我可以帮忙,并在您的原始帖子中发表了评论。
      【解决方案3】:

      如果你想模拟你需要一个应用程序端点。

      使用应用程序端点创建对话对象并...

      Conversation conversation = new Conversation(_appEndpoint); conversation.Impersonate("sip:something@something.com", "phoneUri, "Display Name");

      【讨论】:

      • 这样我代表其他人创建了一个特定的对话...不可能以这种方式接收该用户的所有来电,是吗?
      • 否,要接收用户的来电,您需要创建一个UserEndpointApplicationEndpoint 只接收对其自己的端点 uri 的调用。
      【解决方案4】:

      Source

         userEndpointSettings = new UserEndpointSettings(_userURI, _serverFqdn);
      
                  if (!_useSuppliedCredentials)
                  {
                      _credential = new System.Net.NetworkCredential(_userName, _userPassword, _userDomain);
                      userEndpointSettings.Credential = _credential;
                  }
                  else
                  {
                      userEndpointSettings.Credential = System.Net.CredentialCache.DefaultNetworkCredentials;
                  }
      

      _userURI 需要匹配当前登录用户 sip:user@blabla.com

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-12-01
        • 2013-08-31
        • 1970-01-01
        • 2017-04-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多