Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在UCMA 4中建立没有凭据的UserEndpoint_C#_Lync_Ucma - Fatal编程技术网

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

C# 在UCMA 4中建立没有凭据的UserEndpoint,c#,lync,ucma,C#,Lync,Ucma,如何在没有凭据的情况下建立UserEndpoint?我在某个地方读到,如果应用程序/应用程序服务器受Lync Server信任,那么它应该是可能的。情况确实如此,但似乎不起作用。我总是有例外 找不到域的匹配凭据 不确定是否在没有凭据的情况下建立用户端点,但如果有帮助,您肯定可以在已建立的对话中模拟一个 只需签出对话类上的模拟方法。如果要模拟,则需要应用程序终结点 使用应用程序端点创建对话对象并 Conversation Conversation=新对话(_appEndpoint); 对话。模拟(

如何在没有凭据的情况下建立UserEndpoint?我在某个地方读到,如果应用程序/应用程序服务器受Lync Server信任,那么它应该是可能的。情况确实如此,但似乎不起作用。我总是有例外

找不到域的匹配凭据


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


只需签出对话类上的模拟方法。

如果要模拟,则需要应用程序终结点

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

Conversation Conversation=新对话(_appEndpoint);
对话。模拟(“sip:something@something.com“,”phoneUri,“显示名称”);

首先使用
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\u ApplicationEndpointOwnerDiscovered
callback方法中设置应用程序终结点。完成后,您可以调用此方法并设置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;
    }
}       


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

这样,我就代表其他人创建了一个特定的对话……用这种方式接收这个用户的所有来电是不可能的,是吗?不,要接收一个用户的来电,你需要创建一个
UserEndpoint
ApplicationEndpoint只接收对自己端点uri的调用。问题是我需要解决问题。我需要获取(所有)用户的所有传入调用,而不是创建新对话。所以我想我需要一个UserEndpoint来完成此任务?好的,我想我可以帮上忙,并在您的原始线程中发布了一条评论。
   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;
            }