示例#1
0
        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();
                        }
                    }
                }
            }
        }
示例#2
0
        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();
        }