ApplicationEndPoint в приложениях UCMA

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

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

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

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

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

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


person user1907849    schedule 10.08.2015    source источник


Ответы (2)


Проверь это ...

// 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 User@Host 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:user@host"
        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;
    }
person cealex    schedule 10.08.2015
comment
‹add key=ServerFQDN value=LyncServer2013.telesign.local /› ‹!-- ‹add key=ApplicationHostFQDN value=appmachine.contoso.com/› --› ‹add key=ApplicationHostFQDN value=PoolServer2013.telesign.local /› ‹ добавить ключ = значение ApplicationPort = 10600 / › - person cealex; 10.08.2015
comment
‹!-- ГРУУ, которому назначен контакт приложения. --› ‹!-- ‹add key=ApplicationGRUU value=sip:[email protected];gruu;opaque=srvr:service:uRYqodmwaFSSHo0TQSUv7QAA/› --› ‹add key=ApplicationGRUU value=sip:aplicacao [email protected];gruu;opaque=srvr:service:uRYqodmwaFSSHo0TQSUv7QAA /› - person cealex; 10.08.2015
comment
‹!-- ‹add key=ApplicationContactURI1 value=user@host/› --› ‹add key=ApplicationContactURI1 [email protected] /› ‹!-- Укажите понятное имя сертификата, который следует использовать для связи с сервером. --› ‹!-- Образец ищет соответствующий сертификат в хранилище LocalComputer/Personal. --› ‹добавить ключ=CertificateFriendlyName значение=Сертификат Lync Pool Server 2013 /› - person cealex; 10.08.2015

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

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

person Paul Hodgson    schedule 11.08.2015