示例#1
0
        public void DestroyPhone()
        {
            if (LinphoneCore != null)
            {
                RegistrationStateChangedEvent?.Invoke(LinphoneRegistrationState.LinphoneRegistrationProgress);

                CallModule.linphone_core_terminate_all_calls(LinphoneCore);

                var proxySetDownTask = ComponentExtensions.ExecuteWithDelay(() =>
                {
                    if (ProxieModule.linphone_proxy_config_is_registered(ProxyCfg))
                    {
                        ProxieModule.linphone_proxy_config_edit(ProxyCfg);
                        ProxieModule.linphone_proxy_config_enable_register(ProxyCfg, false);
                        ProxieModule.linphone_proxy_config_done(ProxyCfg);
                    }
                }, Constants.LC_CORE_PROXY_DISABLE_TIMEOUT);

                proxySetDownTask.Wait(Constants.LC_CORE_PROXY_DISABLE_TIMEOUT);

                IsRunning = ProxieModule.linphone_proxy_config_is_registered(ProxyCfg);
            }
        }