public void Call(int targetNumber) { if (targetNumber != TelephonNumber) { OutgoingCallEvent?.Invoke(this, new EventArgsCall(TelephonNumber, targetNumber)); } else { _help.GetMessageAboutCallYourself(targetNumber); } }
public void OnOutgoingCall(object sender, CallEventArgs e) { if (State == PortStates.Connected) { State = PortStates.Calling; e.Id = Guid.NewGuid(); Console.WriteLine($"Port {e.SourcePhoneNumber} has received an outgoing call request to {e.TargetPhoneNumber}"); OutgoingCallEvent?.Invoke(sender, e); } }
private void OutgoingCall(object sender, CallEventArgs e) { e = new CallEventArgs(Id, e.TargetNumber); OutgoingCallEvent?.Invoke(this, e); }
/// <summary> /// Method to call other client. /// </summary> /// <param name="targetNumber">Number to call.</param> public void Call(int targetNumber) { OutgoingCallEvent?.Invoke(this, new CallEventArgs(Guid.NewGuid(), targetNumber)); }