private void AcceptStation(object sender, EventArgs e) { var port = sender as IPort; var currentSession = _sessionContainer.GetByTarget(port, SessionState.Open); if (currentSession != null) { currentSession.Source.StateCall = PortStateCall.Busy; currentSession.Target.StateCall = PortStateCall.Busy; currentSession.State = SessionState.Connected; currentSession.Start = DateTime.Now; Console.WriteLine("Incoming call accepted"); } else { Console.WriteLine("Incoming call not found"); } }