void Call_OnInfoChanged()
        {
            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnInfoChanged);

                return;
            }

            if (_active)
            {
                RefreshUI();
            }

            RefreshBackUI();
        }
        void Call_OnRemoved(CallRemoveReason reason)
        {
            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnRemoved, reason);

                return;
            }

            if (Active && Call != null && Call.Number == _controlCallerNumber.Text)
            {
                _controlCallerNumber.Text = "";
            }

            Call = null;

            RefreshBackUI();
        }
        void Call_OnStateChanged()
        {
            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnStateChanged);

                return;
            }

            Trace.TraceInformation("New call state on MainFormPhoneLineControl" + ControlButton.Text + ", new state: " + SipHelper.SipCallStateDecode(_call?.State ?? CallState.NULL));

            if (_active)
            {
                RefreshUI();
            }

            RefreshBackUI();
        }
        void Call_OnDurationChanged()
        {
            if (!_active || _call == null)
            {
                return;
            }

            if (ControlButton.InvokeRequired)
            {
                ControlButton.BeginInvoke(_callOnDurationChanged);

                return;
            }

            if (_call.ActiveDuration > TimeSpan.Zero)
            {
                _controlDuration.Text = _call.ActiveDuration.ToFormattedString();
            }
            else if (_call.Duration > TimeSpan.Zero)
            {
                _controlDuration.Text = _call.Duration.ToFormattedString();
            }
        }