public void CreateCall(string dial) { call = softPhone.CreateCallObject(phoneLine, dial); WireUpCallEvents(); call.Start(); IsICall = true; }
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(); }
/// <summary> /// It starts a call with the dialed number or in case of an incoming call it accepts, picks up the call. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAramaYap_Click(object sender, EventArgs e) { if (inComingCall) { inComingCall = false; ////////////call.Accept(); return; } if (call != null) { return; } if (string.IsNullOrEmpty(labelDialingNumber.Text)) { return; } ////////////if (phoneLineInformation != PhoneLineState.RegistrationSucceeded && phoneLineInformation != PhoneLineState.NoRegNeeded) ////////////{ //////////// MessageBox.Show("Telefon hattı açılamadı."); //////////// return; ////////////} call = softPhone.CreateCallObject(phoneLine, labelDialingNumber.Text); WireUpCallEvents(); call.Start(); }
/// <summary> /// It starts a call with the dialed number or in case of an incoming call it accepts, picks up the call. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonPickUp_Click(object sender, EventArgs e) { if (inComingCall) { inComingCall = false; call.Accept(); return; } if (call != null) return; if (string.IsNullOrEmpty(_TelefonNo)) return; if (phoneLineInformation != PhoneLineState.RegistrationSucceeded && phoneLineInformation != PhoneLineState.NoRegNeeded) { MessageBox.Show("Phone line state is not valid!"); return; } call = softPhone.CreateCallObject(phoneLine, _TelefonNo); WireUpCallEvents(); call.Start(); }
public void CreateCallToStream(string dial) { call = softPhone.CreateCallObject(phoneLine, dial); StartEvent(); call.ModifyCallType(CallType.AudioVideo); call.Start(); }
private void dialButton_Click(object sender, EventArgs e) { try { if (agentSkill.SelectedItem != null && agentCurrentState.Text == "Dialing") { call = softphone.CreateCallObject(phoneLine1, to.Text); call.CallStateChanged += call_CallStateChanged; cStateDirection.Text = "Out"; call.Start(); main.activateDefaultVoiceDevices(); caller.Text = to.Text; } else { DialogResult result = MessageBox.Show("Dış arama yaparken statünüzün Dialing olması ve dış arama için kullanacağınız skill'i seçmeniz gerekir.", "Dialing ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification); if (result == DialogResult.Yes) { wsc.changeAgentState("Dialing", e); } else { main.errorModal("Dış arama yaparken statünüzün Dialing olması ve dış arama için kullanacağınız skill'i seçmeniz gerekir."); } } } catch (Exception err) { main.errorModal("Çağrı başlatılamadı. Hata:" + err); } }
/// <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}"); }
private void Dial() { _log.Info(String.Format("Calling {0}", _config.GetStringValue("call"))); _call = _softPhone.CreateCallObject(_phoneLine, _config.GetStringValue("call")); _call.CallStateChanged += CallStateChangedHandler; _call.InstantMessageSendError += MessageSendError; _call.Start(); }
private void StartCall(string numberToDial) { if (call == null) { call = softphone.CreateDirectIPCallObject(phoneLine, new DirectIPDialParameters("5060"), numberToDial); call.CallStateChanged += call_CallStateChanged; call.Start(); } }
/// <summary> /// Starts calling the specified number. /// In this sample an outgoing call can be made if there is no current call (outgoing or incoming) on the phone line. /// </summary> public void StartCall(string numberToDial) { if (_call == null) { _call = _softphone.CreateCallObject(_phoneLine, numberToDial); WireUpCallEvents(); _call.Start(); } }
protected override void GivenOverride() { _call = _phone.CreateCall(); _call.CallErrorOccured += (s, e) => _callError = e.Item; _call.CallStateChanged += (s, e) => _callState = e.Item; _call.Start(_testClientUaUri.FormatToString()); _waitingforInviteReceived.WaitOne(); _phone.InternalState.Should().Be(_stateProvider.GetWaitProvisional()); /*required assertion*/ }
private void btnTransfer_Click(object sender, EventArgs e) { string transferTo = txtNoTransferir.Text; _call.ToggleHold(); _call2 = _softPhone.CreateCallObject(_phoneLine, transferTo); _call2.CallStateChanged += call2_CallStateChanged; _call2.Start(); }
/// <summary> /// Starts calling the specified number. /// In this sample an outgoing call can be made if there is no current call (outgoing or incoming) on the phone line. /// </summary> public void StartCall(string numberToDial) { if (_call == null) { _call = _softphone.CreateCallObject(_phoneLine, numberToDial); WireUpCallEvents(); // To make a call simply call the Start() method of the call object. _call.Start(); } }
public void Calling() { if (_call != null || !(_phoneLineInformation.IsRegistered())) { InvokeGUIThread(() => { lb_Log.Items.Add("Call error: " + _phoneLineInformation.ToString()); }); return; } _call = _softPhone.CreateCallObject(_phoneLine, txtNumber.Text); WireUpCallEvents(); _call.Start(); }
/// <summary> /// Iniciar llamada. /// </summary> private static void startCall() { try { call = softphone.CreateCallObject(phoneLine, registerName); call.CallStateChanged += callStateChanged; call.Start(); } catch (Exception e) { log.Error(e); } }
public void StartCall(string numberToDial) { phoneLineInitialization(); if (call == null) { Console.WriteLine("starting call"); call = softphone.CreateDirectIPCallObject(phoneLine, new DirectIPDialParameters("5060"), numberToDial); call.CallStateChanged += call_CallStateChanged; call.Start(); Console.WriteLine(call.CallID); } }
private void StartCall(string numberToDial) { //phoneLineInit(myNumber); Caller = new Thread(Ozeki); Caller.Start(); Thread.Sleep(1000); if (call == null) { call = softphone.CreateDirectIPCallObject(phoneLine, new DirectIPDialParameters("5060"), numberToDial); call.CallStateChanged += call_CallStateChanged; call.Start(); } }
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 btn_Redial_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(reDialNumber)) { return; } if (call != null) { return; } call = softPhone.CreateCallObject(phoneLine, reDialNumber); WireUpCallEvents(); call.Start(); }
protected override void GivenOverride() { _call = _phone.CreateCall(); _call.CallStateChanged += call_CallStateChanged; _call.Start(_testClientUaUri.FormatToString()); _waitingforInviteReceived.WaitOne(); _phone.InternalState.Should().Be(_stateProvider.GetWaitProvisional()); /*required assertion*/ _toTag = SipUtil.CreateTag(); var provResponse = CreateRingingResponse(_receivedInvite, _toTag); _network.SendTo(SipFormatter.FormatMessage(provResponse), _testClientUaEndPoint, _phoneUaEndPoint); _ringingProcessed.WaitOne(); _phone.InternalState.Should().Be(_stateProvider.GetWaitFinal()); /*required assertion*/ }
private void StartCall(IPhoneCall call) { if (call == null) { return; } SubscribeToCallEvents(call); call.Start(); PhoneCalls.Add(call); if (SelectedCall == null) { SelectedCall = call; } }
private void Calling() { if (_call != null || !(_phoneLine.RegState == RegState.RegistrationSucceeded)) { InvokeGUIThread(() => { lb_Log.Items.Add("Call error: " + _phoneLine.RegistrationInfo.StatusCode.ToString()); }); return; } SetupCalling(); _call = _softPhone.CreateCallObject(_phoneLine, txtNumber.Text); SubcribedCallEvents(); _call.Start(); RefeshControlCall(); }
private void StartCall(IPhoneCall call) { lock (_sync) { if (call == null) { return; } SubscribeToCallEvents(call); call.Start(); MediaHandlers.LoadSpeechToText(); PhoneCalls.Add(call); if (SelectedCall == null) { SelectedCall = call; } } }
private void _btnPhone_Click(object sender, EventArgs e) { if (!_callState.HasValue || _callState.Value == CallState.Completed) { FormHelper.ValidateCondition(SipUtil.IsSipUri(_txtToUri.Text), "To-uri"); _outgoingCall = _softPhone.CreateCall(); WireEvents(_outgoingCall); _outgoingCall.Start(_txtToUri.Text); Log("Call started"); } else if (_callState.Value == CallState.Ringing) { _incomingCall.Accept(); } else if (_callState.Value == CallState.Ringback || _callState.Value == CallState.InCall) { _outgoingCall.Stop(); } }
/// <summary> /// Create and start the call to the dialed number /// </summary> /// <param name="dialedNumber"></param> public void Call(string dialedNumber) { if (phoneLineInformation != RegState.RegistrationSucceeded) { Console.WriteLine("Phone line state is not valid!"); return; } if (string.IsNullOrEmpty(dialedNumber)) { return; } if (call != null) { return; } call = softPhone.CreateCallObject(phoneLine, dialedNumber); WireUpCallEvents(); call.Start(); }
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(); }
/// <summary> /// Create and start the call to the dialed number /// </summary> /// <param name="dialedNumber"></param> public void Call(string dialedNumber) { if (phoneLineInformation != RegState.RegistrationSucceeded) { Console.WriteLine("Phone line state is not valid!"); return; } if (string.IsNullOrEmpty(dialedNumber)) return; if (call != null) return; call = softPhone.CreateCallObject(phoneLine, dialedNumber); WireUpCallEvents(); call.Start(); }
void CreateCall() { var numberToDial = id2; call = softphone.CreateCallObject(phoneLine, numberToDial); call.CallStateChanged += call_CallStateChanged; call.Start(); }
protected void CallAlice() { _outgoingCallAlice = _phoneBob.CreateCall(); WireEventsBob(_outgoingCallAlice); _outgoingCallAlice.Start(_aliceEndPoint.ToString()); }
protected void CallBob() { _outgoingCallBob = _phoneAlice.CreateCall(); WireEventsAlice(_outgoingCallBob); _outgoingCallBob.Start(_bobEndPoint.ToString()); }
public void CreateCall(string pPhoneNo, int pPhoneRingTimeOut = 30) { if (pPhoneRingTimeOut > 0) m_RingingTimeOut = pPhoneRingTimeOut; m_RingTimeOut = false; m_PhoneNo = pPhoneNo; m_UserMicrophone.Start(); connector.Connect(m_UserMicrophone, mediaSender); AudioId = Guid.NewGuid(); CommonApplicationData commonData = new CommonApplicationData("BrightVision", "BrightSales", true); m_UserMicrophone.Start(); string fileNameTmp = String.Format(@"{0}\tmpwav\{1}_.wav", commonData.ApplicationFolderPath, AudioId); recorder = new WaveStreamRecorder(fileNameTmp); recorder.Stopped += new EventHandler<EventArgs>(recorder_Stopped); connector.Connect(m_UserMicrophone, mixer); connector.Connect(mediaReceiver, mixer); connector.Connect(mixer, recorder); m_UserSpeaker.Start(); connector.Connect(mediaReceiver, m_UserSpeaker); call = softPhone.CreateCallObject(phoneLine, m_PhoneNo); mediaSender.AttachToCall(call); mediaReceiver.AttachToCall(call); this.WireUpCallEvents(); //System.Threading.Thread.Sleep(1500); call.Start(); //softPhone.RegisterPhoneLine(phoneLine); //this.InitializeSoftPhone(); }
private void StartCall(IPhoneCall call) { if (call == null) return; SubscribeToCallEvents(call); call.Start(); PhoneCalls.Add(call); if (SelectedCall == null) SelectedCall = call; }