Пример #1
0
        private void LinphoneMainLoopHandler()
        {
            while (IsRunning)
            {
                CoreModule.linphone_core_iterate(LinphoneCore);
                Thread.Sleep(Constants.LC_SLEEP_TIMEOUT);
            }

            // Phone is disabled, free resources
            NetworkModule.linphone_nat_policy_unref(NatPolicy);
            CoreModule.linphone_core_unref(LinphoneCore);

            VTablePtr.Free();
            TransportConfigPtr.Free();

            registration_state_changed = null;
            call_state_changed         = null;

            LinphoneCore       = IntPtr.Zero;
            ProxyCfg           = IntPtr.Zero;
            AuthInfo           = IntPtr.Zero;
            TransportConfigPtr = IntPtr.Zero;

            coreLoop   = null;
            Identity   = null;
            ServerHost = null;

            RegistrationStateChangedEvent?.Invoke(LinphoneRegistrationState.LinphoneRegistrationCleared);
        }