public void TakeIncomingCall(object sender, CallArgsEvent even) { bool flag = true; _id = even.Id; Console.WriteLine("Incoming call at number:{0} to terminal {1}", even.TelephoneNumber, even.ObjectTelephoneNumber); while (flag == true) { Console.WriteLine("Reply? Yes or No"); char n = Console.ReadKey().KeyChar; if (n == 'y') { flag = false; Console.WriteLine(); AnswerToCall(even.TelephoneNumber, StatusCall.Answered, even.Id); continue; } else if (n == 'n') { flag = false; Console.WriteLine(); EndCall(); } else { flag = true; Console.WriteLine(); } } }
private void CallingTo(object sender, CallArgsEvent even) { DoCallingToEvent(even.TelephoneNumber, even.ObjectTelephoneNumber); }