//Methods-handlers of Port events

        protected virtual void PortOnPortEnabled(object sender, EventArgs e)
        {
            var port = sender as Port;

            if (DisabledPorts.Contains(port))
            {
                DisabledPorts.Remove(port);
                EnabledPorts.Add(port);
            }
            else if (ActivePorts.ContainsKey(port))
            {
                ActivePorts.Remove(port);
                EnabledPorts.Add(port);
            }
        }
        protected virtual void PortOnPortStateSetToActive(object sender, CallEventArgs phoneNumberArgs)
        {
            var port = sender as Port;

            if (DisabledPorts.Contains(port))
            {
                DisabledPorts.Remove(port);
                ActivePorts.Add(port, phoneNumberArgs.number);
            }
            if (EnabledPorts.Contains(port))
            {
                EnabledPorts.Remove(port);
                ActivePorts.Add(port, phoneNumberArgs.number);
            }
            CheckActivePortCalledNumber(port, phoneNumberArgs.number);
        }