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(); }
private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { _phoneLineInformation = e.State; if (_phoneLineInformation == RegState.RegistrationSucceeded) { _message.Add("Registration succeeded - Online"); } else { _message.Add($"Not registered - Offline: {_phoneLineInformation.ToString()}"); } }
private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { phoneLineInformation = e.State; InvokeGUIThread(() => { if (phoneLineInformation == RegState.RegistrationSucceeded) { lb_Log.Items.Add("Registration succeeded - Online"); } else { lb_Log.Items.Add("Not registered - Offline: " + phoneLineInformation.ToString()); } }); }
private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { _phoneLineInformation = e.State; InvokeGUIThread(() => { if (_phoneLineInformation == RegState.RegistrationSucceeded) { lb_Log.Items.Add("Registration succeeded - Online"); btnRegister.Text = "UnRegister"; pbxStatus.Image = Properties.Resources.presenceAvailable; cbxStatus.SelectedIndex = 1; //cbxStatus.ForeColor = Color.LightGreen; } else { lb_Log.Items.Add("Not registered - Offline: " + _phoneLineInformation.ToString()); //btnRegister.Text = "Error"; } }); }