Пример #1
0
 private void CallingTo(object sender, CallEventArgs e)
 {
     RaiseCallingToEvent(e.TelephoneNumber, e.TargetTelephoneNumber);
 }
Пример #2
0
 public void TakeIncomingCall(object sender, CallEventArgs e)
 {
     bool flag = true;
     _id = e.Id;
     Console.WriteLine("Have incoming Call at number: {0} to terminal {1}", e.TelephoneNumber, e.TargetTelephoneNumber);
     while (flag == true)
     {
         Console.WriteLine("Answer? Y/N");
         char k = Console.ReadKey().KeyChar;
         if (k == 'Y' || k == 'y')
         {
             flag = false;
             Console.WriteLine();
             AnswerToCall(e.TelephoneNumber, CallState.Answered, e.Id);
         }
         else if (k == 'N' || k == 'n')
         {
             flag = false;
             Console.WriteLine();
             EndCall();
         }
         else
         {
             flag = true;
             Console.WriteLine();
         }
     }
 }