public void RejectCall(string sourcePhoneNumber) { if (isConnectedToPort) { RejectCallEvent?.Invoke(this, new RejectCallEventArgs(sourcePhoneNumber)); Console.WriteLine($"Terminal {PhoneNumber} rejected the call{sourcePhoneNumber}"); } else { throw new ArgumentException("Your terminal didn't connect to terminal"); } }
public void OnRejectedCall(object sender, RejectCallEventArgs e) { Console.WriteLine($"Terminal {_terminalId} got response about rejecting incoming call from {e.SourceNumber}"); RejectCallEvent?.Invoke(this, e); }