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

Posted

技术标签:

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

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

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

【问题讨论】:

【参考方案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

【讨论】:

以上是关于在 UCMA 4 中建立没有凭据的 UserEndpoint的主要内容,如果未能解决你的问题,请参考以下文章

在 UCMA 4.0 应用程序中接受 Lync 客户端的来电

在 UCMA 3.0 中正确建立 ApplicationEndpoint

在 UCMA 中取消转移

UCMA 呼叫建立仅在 30 秒后才给出忙响应

Glassfish 4没有资源的密码凭据

使用 UCMA 4.0 的呼叫队列方法