在UCMA 4中建立没有凭据的UserEndpoint

时间:2014-10-14 08:29:02

标签: c# lync ucma

如何在没有凭据的情况下建立UserEndpoint?我在某处读到,如果Lync Server信任Application / ApplicationServer,那么应该可以。情况确实如此,但似乎不起作用。我总是得到例外

  

找不到该领域的匹配凭证。

4 个答案:

答案 0 :(得分:2)

使用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;
    }
}       

答案 1 :(得分:0)

不确定是否建立没有凭据的用户端点,但如果有帮助,您绝对可以在已建立的对话中冒充其中一个。

只需在会话类上签出Impersonate方法。

答案 2 :(得分:0)

如果要模拟,则需要应用程序端点。

使用应用程序端点创建一个Conversation对象并...

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

答案 3 :(得分:0)

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