private void EnableEndpoint(AvailabilityValues availabality, bool softphone) { CloseDisconnectWindow(); var configuration = new EndpointConfiguration() { EndpointId = Settings.Default.EndpointId, Uri = Settings.Default.SignInAddress, DetectServer = Settings.Default.AutoConfigServer, Username = Settings.Default.Username, Password = Settings.Default.Password, Realm = Settings.Default.Realm, DisableImSessions = softphone, DisablePublicationsSubscriptions = softphone, }; if (Settings.Default.UseDefaultCredential && Settings.Default.UseSpecifiedCredential) { configuration.AuthenticationModes = EndpointConfiguration.AllAuthenticationModes; } else if (Settings.Default.UseDefaultCredential) { configuration.AuthenticationModes = EndpointConfiguration.DefaultAuthenticationModes; } else { configuration.AuthenticationModes = EndpointConfiguration.CustomAuthenticationModes; } if (Settings.Default.AutoConfigServer == false) { configuration.SignalingServer = new SignalingServer() { ServerAddress = Settings.Default.ServerAddress, TransportMode = (TransportMode)Settings.Default.IpProtocol }; } Endpoint.BeginLogin(configuration, availabality); }