コード例 #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
ファイル: MainPage.xaml.cs プロジェクト: yuanjianjiang/boghe
        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();
        }