protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); mNativeEventsListener.Start(); if (!rtServiceManager.Instance.IsStarted) { rtServiceManager.Instance.Start(); } SipService sipService = rtServiceManager.Instance.SipService; if (sipService != null && sipService.RegistrationState != SipSessionState.Connected) { if (sipService != null && sipService.SipActiveAVCall == null) { if (sipService.Stop(false)) { if (sipService.Start()) { sipService.Register(); } } } } }
void buttonSaveSettings_Click(object sender, RoutedEventArgs e) { buttonSaveSettings.IsEnabled = false; SaveSettings(); new Thread(() => { SipService sipService = rtServiceManager.Instance.SipService; if (sipService != null && sipService.SipActiveAVCall == null) { if (sipService.Stop(false)) { rtServiceManager.Instance.UpdateSipConfig(); if (sipService.Start()) { sipService.Register(); } } } }).Start(); }