Сначала необходимо подготовить конечную точку приложения после общих шагов активации приложения.
Выполните следующие действия с помощью API ucma 3.0 после:
1) Create a new collaboration platform. Using
X509Certificate2 cert ="your certificate thumb here";
CollaborationPlatform _collabPlatform;
ServerPlatformSettings settings = new ServerPlatformSettings(Name, LocalhostFQDN, ServicePort, ServerGruu, cert);
_collabPlatform = new CollaborationPlatform(settings);
_collabPlatform.AllowedAuthenticationProtocol = SipAuthenticationProtocols.Ntlm;
_collabPlatform.BeginStartup(PlatformStartupCompleted, _collabPlatform);
2) Create a new Endpoint.
Here is the callback.
private void PlatformStartupCompleted(IAsyncResult result)
{
try
{
_collabPlatform.EndStartup(result);
ApplicationEndpointSettings settings = new ApplicationEndpointSettings( AgentUri, ServerFQDN, ServerPort);
// For registered endpoints (recommended).
settings.UseRegistration = true;
_localEndpoint = new ApplicationEndpoint(_collabPlatform, settings);
_localEndpoint.BeginEstablish(EndpointEstablishCompleted, null);
}
catch (ConnectionFailureException connFailEx)
{
// ConnectionFailureException will be thrown when the platform cannot connect.
}
catch (RealTimeException rte)
{
// Any other RealTimeException could occur due to other error.
}
}
}
private void EndpointEstablishCompleted(IAsyncResult result)
{
_localEndpoint.EndEstablish(result);
//Register Event for incoming call here.
}