/// <summary> /// 拨号或者接听 /// </summary> /// <param name="number"></param> public void PickUp(string number) { // accept incoming call if (call != null && call.IsIncoming) { RaiseMessage?.Invoke("Talking"); call.Answer(); return; } // dial if (call != null) { return; } if (string.IsNullOrEmpty(number)) { return; } if (phoneLine.RegState != RegState.RegistrationSucceeded) { RaiseMessage?.Invoke("Phone line must be registered!"); return; } call = softPhone.CreateCallObject(phoneLine, number); SubscribeToCallEvents(call); call.Start(); RaiseMessage?.Invoke($"Calling {number}"); }
void btn_PickUp_Click(object sender, EventArgs e) { if (_incomingCall) { _incomingCall = false; _call.Answer(); return; } if (_call != null) { return; } if (_phoneLineState != RegState.RegistrationSucceeded) { InvokeGUIThread(() => { tb_Display.Text = "OFFLINE! Please register."; }); return; } if (!String.IsNullOrEmpty(tb_Display.Text)) { var userName = tb_Display.Text; _call = _softPhone.CreateCallObject(_phoneLine, userName); WireUpCallEvents(); _call.Start(); _otherParty = _databaseManager.GetOtherPartyInfos(userName); ShowUserInfos(_otherParty); } }
private void btn_PickUp_Click(object sender, EventArgs e) { if (inComingCall) { inComingCall = false; call.Answer(); InvokeGUIThread(() => { lb_Log.Items.Add("Call accepted."); }); return; } if (call != null) { return; } if (phoneLineInformation != RegState.RegistrationSucceeded) { InvokeGUIThread(() => { lb_Log.Items.Add("Registratin Failed!"); tb_Display.Text = "OFFLINE"; }); return; } reDialNumber = tb_Display.Text; call = softPhone.CreateCallObject(phoneLine, tb_Display.Text); WireUpCallEvents(); call.Start(); }
private void SoftPhone_IncomingCall(object sender, global::Ozeki.Media.VoIPEventArgs <IPhoneCall> e) { MessageBox.Show("Incoming call"); call = e.Item; call.Answer(); AttachSendCall(); }
static void softphone_IncomingCall(object sender, VoIPEventArgs <IPhoneCall> e) { call = e.Item; caller = call.DialInfo.CallerID; call.CallStateChanged += call_CallStateChanged; call.Answer(); }
private void softphone_IncomingCall(object sender, VoIPEventArgs <IPhoneCall> e) { if (call == null) { System.Windows.Application.Current.Dispatcher.Invoke(() => { call = e.Item; caller = call.DialInfo.CallerDisplay; call.CallStateChanged += call_CallStateChanged; CzyOdebrac czyookno = new CzyOdebrac(caller); if (czyookno.ShowDialog().Value) { if (call != null) { call.Answer(); } } else { if (call != null) { call.Reject(); } } }); } }
private void Answering() { if (_call != null) { _inComingCall = false; _call.Answer(); InvokeGUIThread(() => { lb_Log.Items.Add("Call accepted."); }); } }
/// <summary> /// Answers the current incoming call. /// </summary> public void AcceptCall() { // when the value of the incomingCall member is true, there is an incoming call if (_incomingCall) { _incomingCall = false; _call.Answer(); } }
private void Call_CallStateChanged(object sender, CallStateChangedArgs e) { if (e.State == CallState.Answered) { StartSpeaker(); call.Answer(); AttachReceiveCall(); } }
public void lnkPickUp_Click(object sender, EventArgs e) { if (_incomingCall) { lnkPickUpInCall.Visible = false; timer3.Enabled = true; _incomingCall = false; _call.Answer(); return; } if (_call != null) { return; } if (_phoneLineState != RegState.RegistrationSucceeded) { InvokeGUIThread(() => { txtDisplay.Text = "OFFLINE! Please register."; }); return; } if (!String.IsNullOrEmpty(txtDisplay.Text)) { var userName = txtDisplay.Text; lnkConfigurar.Enabled = false; if (pnlLlamada.Visible == true) { frmTelefono.Animate2(pnlLlamada, frmTelefono.Effect.Slide, 150, 180); frmTelefono.Animate(pnlKeyPad, frmTelefono.Effect.Slide, 150, 360); frmTelefono.Animate2(pnlLlamada, frmTelefono.Effect.Slide, 150, 180); } else { frmTelefono.Animate(pnlKeyPad, frmTelefono.Effect.Slide, 150, 360); frmTelefono.Animate2(pnlLlamada, frmTelefono.Effect.Slide, 150, 180); } lnkPickUpInCall.Visible = false; timer3.Enabled = true; _call = _softPhone.CreateCallObject(_phoneLine, userName); WireUpCallEvents(); _call.Start(); } }
private void button1_Click(object sender, EventArgs e) { if (InComingCall) { InComingCall = false; PhoneCall.Answer(); InvokeGUIThread(mymsg = "Call accepted.\n"); return; } if (PhoneCall != null) { return; } }
static void softphone_IncomingCall(object sender, VoIPEventArgs <IPhoneCall> e) { call = e.Item; caller = call.DialInfo.CallerID; /*DialogResult dialogResult = MessageBox.Show("Chcesz odebrać połączenie od: "+caller.ToString(), "Some Title", MessageBoxButtons.YesNo); * if(dialogResult == DialogResult.Yes) * { * call.CallStateChanged += call_CallStateChanged; * call.Answer(); * } * else if (dialogResult == DialogResult.No) * { * MessageBox.Show("Polaczenie od: " + caller.ToString()+" odrzucone"); * CloseDevices(); * }*/ //MessageBox.Show("Chcesz odebrac polaczenie od: " + caller.ToString()); call.CallStateChanged += call_CallStateChanged; call.Answer(); }
public void Pick_up(string _numberDial) { if (_inComingCall) { _inComingCall = false; _call.Answer(); return; } if (_call != null) { return; } if (_phoneLineInformation != RegState.RegistrationSucceeded) { _message.Add("Registratin Failed! OFFLINE"); return; } _call = _softPhone.CreateCallObject(_phoneLine, string.IsNullOrWhiteSpace(_numberDial) ? _reDialNumber : _numberDial); WireUpCallEvents(); _call.Start(); }
private void answerButton_Click(object sender, EventArgs e) { call.Answer(); }
public void Answering() { _inComingCall = false; _call.Answer(); InvokeGUIThread(() => { lb_Log.Items.Add("Call accepted."); }); }
public void Answer() { call.Answer(); }