2015-08-10 2 views
2

У меня есть приложение, которое использует UCMA для получения статуса пользователей lync.ApplicationEndPoint в приложениях UCMA

У меня есть разъяснение. Я скачал пример приложения, который наследует класс следующим образом:

public class UcPresenceProvider : Microsoft.Rtc.Collaboration.Samples.HTMLPresenceControls.Service.IPresenceProvider 
    { 

    public UcPresenceProvider(ApplicationEndpoint endpoint) 
     { 
      m_applicationEndpoint = endpoint; 
     } 
} 

С точки зрения непрофессионала зрения, какова будет величина для конечной точки ApplicationEndpoint будет.

Мне просто нужен статус зарегистрированного пользователя.

ответ

1

проверить это ...

// Gateway participant that impersonates a phone user 
// _gatewayEndpoint = _helper.CreateApplicationEndpoint(
// "GatewayParticipant" /*endpointFriendlyName*/); 

public ApplicationEndpoint CreateApplicationEndpoint(string contactFriendlyName) 
    { 
     string prompt = string.Empty; 

     if (string.IsNullOrEmpty(contactFriendlyName)) 
     { 
      contactFriendlyName = "Default Contact"; 
     } 

     Console.WriteLine(); 
     Console.WriteLine("Creating Application Endpoint {0}...", contactFriendlyName); 
     Console.WriteLine(); 

     // If application settings are provided via the app.config file, then use them 
     // Else prompt user for details 
     if (!ReadApplicationContactConfiguration()) 
     { 
      // Prompt user for server FQDN. If server FQDN was entered before, then let the user use the saved value. 
      if (string.IsNullOrEmpty(_serverFqdn)) 
      { 
       prompt = "Please enter the FQDN of the Microsoft Lync Server for this topology => "; 
       _serverFqdn = PromptUser(prompt, null); 
      } 

      if (string.IsNullOrEmpty(_applicationHostFQDN)) 
      { 
       prompt = "Please enter the FQDN of the Machine that the application service is configured to => "; 
       _applicationHostFQDN = PromptUser(prompt, null); 
      } 
      if (0 >= _applicationPort) 
      { 
       // Prompt user for contact port 
       prompt = "Please enter the port that the application service is configured to => "; 
       _applicationPort = int.Parse(PromptUser(prompt, null), CultureInfo.InvariantCulture); 
      } 

      if (string.IsNullOrEmpty(_applicationGruu)) 
      { 
       // Prompt user for Contact GRUU 
       prompt = "Please enter the GRUU assigned to the application service => "; 
       _applicationGruu = PromptUser(prompt, null); 
      } 

      if (string.IsNullOrEmpty(_applicationContactURI)) 
      { 
       // Prompt user for contact URI 
       prompt = "Please enter the Contact URI in the [email protected] format => "; 
       _applicationContactURI = PromptUser(prompt, null); 
       if (!_applicationContactURI.Trim().StartsWith(_sipPrefix, StringComparison.OrdinalIgnoreCase)) 
       { 
        _applicationContactURI = _sipPrefix + _applicationContactURI.Trim(); 
       } 
      } 

      if (string.IsNullOrEmpty(_certificateFriendlyName)) 
      { 
       // Prompt user for contact URI 
       prompt = "Please enter the friendly name of the certificate to be used => "; 
       _certificateFriendlyName = PromptUser(prompt, null); 
      } 
     } 

     // Reuse platform instance so that all endpoints share the same platform. 
     if (_serverCollabPlatform == null) 
     { 
      CreateAndStartServerPlatform(); 
     } 

     // Initalize and register the endpoint. 
     // NOTE: the _applicationContactURI should always be of the form "sip:[email protected]" 
     ApplicationEndpointSettings appEndpointSettings = new ApplicationEndpointSettings(_applicationContactURI, _serverFqdn, 5061); 
     _applicationEndpoint = new ApplicationEndpoint(_serverCollabPlatform, appEndpointSettings); 
     _endpointInitCompletedEvent.Reset(); 

     Console.WriteLine("Establishing the endpoint..."); 
     _applicationEndpoint.BeginEstablish(EndEndpointEstablish, _applicationEndpoint); 

     // Sync; wait for the registration to complete. 
     _endpointInitCompletedEvent.WaitOne(); 
     Console.WriteLine("Application Endpoint established..."); 
     return _applicationEndpoint; 
    } 
+0

<добавить ключ = значение "ServerFQDN" = "LyncServer2013.telesign.local" /> -> < add key = "ApplicationHostFQDN" value = "PoolServer2013.telesign.local" /> cealex

+0

-> cealex

+0

-> \t cealex

0

Это будет один из доверенных конечных точек приложения, которые вы добавили к этому UCMA применения при предусмотренном его на SFB/Lync.

Если вас интересует только присутствие одного пользователя, возможно, что UCMA переполнен, вы можете захотеть использовать клиентский SDK.

Смежные вопросы