private void StartupEndpoint(AsyncTask task, object state) { task.DoOneStep( delegate() { m_endpoint = new ApplicationEndpoint(m_parent.Platform, m_settings); m_endpoint.RegisterForIncomingCall <AudioVideoCall>(this.ReceiveIncomingAvCall); m_endpoint.RegisterForIncomingCall <InstantMessagingCall>(this.ReceiveIncomingIMCall); m_endpoint.LocalOwnerPresence.SubscriberNotificationReceived += SubscriberNotificationReceived; m_endpoint.StateChanged += this.EndpointStateChanged; Logger.Log(Logger.LogLevel.Info, "Starting Application Endpoint."); m_endpoint.BeginEstablish( delegate(IAsyncResult ar) { task.DoOneStep( delegate() { m_endpoint.EndEstablish(ar); Logger.Log(Logger.LogLevel.Info, "Started Application Endpoint. Tel #:" + m_endpoint.OwnerPhoneUri ?? "null"); m_endpoint.LocalOwnerPresence.BeginSubscribe( delegate(IAsyncResult ar2) { task.DoFinalStep( delegate() { m_endpoint.LocalOwnerPresence.EndSubscribe(ar2); }); }, null); }); }, null); }); }
private async void OnNewApplicationEndpointDiscovered(object sender, ApplicationEndpointSettingsDiscoveredEventArgs e) { log.Info(string.Format("New Endpoint {0} discovered", e.ApplicationEndpointSettings.OwnerUri)); _endpoint = new ApplicationEndpoint(_collabPlatform, e.ApplicationEndpointSettings); _endpoint.RegisterForIncomingCall<InstantMessagingCall>(OnIncomingIM); await _endpoint.EstablishAsync(); log.Info("Endpoint established"); LyncServerReady(this, new EventArgs()); }
private async void OnNewApplicationEndpointDiscovered(object sender, ApplicationEndpointSettingsDiscoveredEventArgs e) { Console.WriteLine(string.Format("New Endpoint {0} discovered", e.ApplicationEndpointSettings.OwnerUri)); _endpoint = new ApplicationEndpoint(_collabPlatform, e.ApplicationEndpointSettings); _endpoint.RegisterForIncomingCall<AudioVideoCall>(OnIncomingCall); await _endpoint.EstablishAsync(); Console.WriteLine("Endpoint established"); await CreateConference(); LyncServerReady(this, new EventArgs()); }
private async void OnNewApplicationEndpointDiscovered(object sender, ApplicationEndpointSettingsDiscoveredEventArgs e) { Console.WriteLine(string.Format("New Endpoint {0} discovered", e.ApplicationEndpointSettings.OwnerUri)); _endpoint = new ApplicationEndpoint(_collabPlatform, e.ApplicationEndpointSettings); _endpoint.RegisterForIncomingCall <InstantMessagingCall>(OnIncomingCall); await _endpoint.EstablishAsync(); Console.WriteLine("Endpoint established"); LyncServerReady(this, new EventArgs()); }
private void EstablishApplicationEndpoint() { string contactUri = ConfigurationManager.AppSettings["contactUri"]; string proxyServerFqdn = ConfigurationManager.AppSettings["proxyServerFqdn"]; int tlsPort = 5061; // ApplicationEndpointSettings settings = new ApplicationEndpointSettings(contactUri); ApplicationEndpointSettings settings = new ApplicationEndpointSettings(contactUri, proxyServerFqdn, tlsPort); settings.UseRegistration = true; settings.AutomaticPresencePublicationEnabled = true; settings.Presence.PresentityType = "automaton"; settings.Presence.Description = "Always available !"; PreferredServiceCapabilities capabilities = settings.Presence.PreferredServiceCapabilities; capabilities.InstantMessagingSupport = CapabilitySupport.Supported; capabilities.AudioSupport = CapabilitySupport.Supported; capabilities.VideoSupport = CapabilitySupport.Supported; capabilities.ApplicationSharingSupport = CapabilitySupport.Supported; _appEndpoint = new ApplicationEndpoint(_collaborationPlatform, settings); _appEndpoint.StateChanged += new EventHandler<LocalEndpointStateChangedEventArgs>(_appEndpoint_StateChanged); // Register to be notified of incoming calls _appEndpoint.RegisterForIncomingCall<AudioVideoCall>(OnAudioVideoCallReceived); // Register to be notified of incoming instant messaging calls _appEndpoint.RegisterForIncomingCall<InstantMessagingCall>(OnInstantMessagingCallReceived); _logger.Log("Establishing application endpoint..."); _appEndpoint.BeginEstablish(OnApplicationEndpointEstablishCompleted, null); }