private void PhoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { if (PhoneLineRegisterStateChange != null) { PhoneLineRegisterStateChange.Invoke(); } }
private void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Console.WriteLine("Registration failed!"); } Invoke((MethodInvoker) delegate { infoTxt.Text = infoTxt.Text + ("Call state:" + e.State.ToString()) + "\r\n"; }); if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded - Online!"); Invoke((MethodInvoker) delegate { infoTxt.Text = infoTxt.Text + ("Registration succeeded - Online!") + "\r\n"; }); /// Console.WriteLine("Enter the IP address of the destination: "); //infoTxt.Text = ("Enter the IP address of the destination: "); string ipToDial = destinationIP.Text; StartCall(ipToDial); } }
private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { InvokeGUIThread(() => { //dont do anything }); }
public static void regStateChanged(RegistrationStateChangedArgs e) { sipClient sipClient = (from p in Application.OpenForms.OfType <sipClient>() select p).FirstOrDefault(); if (e.State == RegState.Error) { sipClient.statusScreen.Text = "Registration failed: " + e.ReasonPhrase.ToString(); logAdd("error", 1, "Registration Failed."); sipClient.Hide(); errorModal("Registration failed: " + e.ReasonPhrase.ToString()); Application.Exit(); } else if (e.State == RegState.RegistrationRequested) { sipClient.statusScreen.Text = "Registering..."; logAdd("", 1, "Registering..."); } else if (e.State == RegState.RegistrationSucceeded) { sipClient.statusScreen.Text = "Registration success."; sipClient.phoneLine1.DoNotDisturb = true; //agentState.SelectedItem = "Logged In"; sipClient.timer1.Enabled = true; sipClient.timer1.Start(); logAdd("", 1, "Registration succesfully."); } else if (e.State == RegState.NotRegistered) { MessageBox.Show("Sunucu ile bağlantı koptu."); } }
private void phoneLine_PhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { var handler = PhoneLineStateChanged; if (handler != null) { handler(this, e); } }
void _phoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { _phoneLineState = e.State; if (_phoneLineState == RegState.RegistrationSucceeded) { InvokeGUIThread(() => { lblExtension.Text = _phoneLine.SIPAccount.UserName; }); InvokeGUIThread(() => { lblIpAddress.Text = _phoneLine.SIPAccount.DomainServerHost; }); } }
private void phoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { Console.WriteLine("Phone line state changed to {0}", e.State); var handler = PhoneLineStateChanged; if (handler != null) { handler(this, e); } }
private void PhoneLine_PhoneLineInfo(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { InvokeGUIThread(mymsg = "Registration failed!!! " + e.Error); } if (e.State == RegState.RegistrationSucceeded) { InvokeGUIThread(mymsg = "Registration succeeded - Online!"); } }
static void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Console.WriteLine("Registration failed!"); } if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Now TLS is encrypted within your softphone!"); } }
private static void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Status.Invoke(new MethodInvoker(delegate { Status.Text = "Blad rejestracji!"; })); } if (e.State == RegState.RegistrationSucceeded) { Status.Invoke(new MethodInvoker(delegate { Status.Text = "Zarejestrowano"; })); } }
static void sipAccount_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.Error || e.State == RegState.NotRegistered) { Console.WriteLine("Registration failed!"); } if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded - RTP Connection is encrypted!"); } }
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()}"); } }
/// <summary> /// Gestionar cambio de estado en la llamada. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void registrationStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { log.Error("Error al registrar la cuenta de usuario: " + RegState.Error); } if (e.State == RegState.RegistrationSucceeded) { log.Info("Registro satisfactorio."); startCall(); } }
/// <summary> /// This will be called when the registration state of the phone line has changed. /// </summary> /// <remarks> /// We need to be notified if our phone line is available to use, but we can also follow it's states. /// </remarks> static void mySoftphone_PhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { Console.WriteLine("Phone line state changed: {0}", e.State); if (e.State == RegState.Error || e.State == RegState.NotRegistered) { ReadRegisterInfos(); } if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded - Online!"); } }
void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { IPhoneCall call = sender as IPhoneCall; if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Console.WriteLine("Registration failed!"); } if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded - Online!"); } }
/// <summary> /// Occurs when phone line state has changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { phoneLineInformation = e.State; Console.WriteLine("Register name:" + ((IPhoneLine)sender).SIPAccount.RegisterName); if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded. Online."); OnRegistrationSucceded(); } else { Console.WriteLine("Current state:" + e.State); } }
/// <summary> /// This will be called when the registration state of the phone line has changed. /// </summary> static void mySoftphone_PhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.RegistrationSucceeded) { _MainWin.WriteMsg("Registration succeeded - Online!"); } else if (e.State == RegState.NotRegistered) { _MainWin.WriteMsg("Not registered"); } else if (e.State == RegState.Error) { _MainWin.WriteMsg("Registration Error!"); } }
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 static void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Console.WriteLine("Rejestracja nieudana!"); } if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Rejestracja pomyslna!"); //Console.WriteLine("Podaj adres IP osoby z ktora chcesz sie polaczyc: "); /*string ipToDial = Console.ReadLine(); * StartCall(ipToDial);*/ } }
private void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { Status_TextBlock.Dispatcher.Invoke(() => { Status_TextBlock.Text = "Status: Offline - wystąpił nieoczekiwany błąd, nie można prowadzić rozmów"; }); } if (e.State == RegState.RegistrationSucceeded) { System.Windows.Application.Current.Dispatcher.Invoke(() => { Status_TextBlock.Text = "Stauts: Online, teraz można rozpocząć rozmowę"; Zadzwon_Button.IsEnabled = true; WyslijWiadomosc_Button.IsEnabled = true; }); } }
private void mySoftphone_PhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { InvokeGUIThread(() => { textBox1.Text += "Phone line state changed:" + e.State; }); if (e.State == RegState.Error || e.State == RegState.NotRegistered) { RegisterInfos(); } if (e.State == RegState.RegistrationSucceeded) { InvokeGUIThread(() => { textBox1.Text += "Registration succeeded - Online!"; }); StartToDial(); } }
private void SoftphoneOnPhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { lock (_lockObj) { if (e.State.IsOneOf(RegState.Error, RegState.NotRegistered, RegState.UnregRequested)) { SetPhoneStatus(PhoneStatus.Unregistered, null); } else if (e.State.IsOneOf(RegState.RegistrationRequested)) { SetPhoneStatus(PhoneStatus.Registering, null); } else { SetPhoneStatus(PhoneStatus.Registered, null); } } }
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"; } }); }
private static void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) { //labell5.Text = "Registration failed!"; labell5.Invoke(new MethodInvoker(delegate { labell5.Text = "Registration failed!"; })); } //Console.WriteLine("Registration failed!"); if (e.State == RegState.RegistrationSucceeded) { //labell6.Text = "Online!"; labell6.Invoke(new MethodInvoker(delegate { labell6.Text = "Online!"; })); //Console.WriteLine("Registration succeeded - Online!"); //Console.WriteLine("Enter the IP address of the destination: "); string ipToDial = DoceloweIP; StartCall(ipToDial); } }
/// <summary> /// This will be called when the state of a phone line has changed. /// </summary> private void Line_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { IPhoneLine line = sender as IPhoneLine; if (line == null) { return; } RegState state = e.State; // registration succeeded, subscribe for MWI if (state == RegState.RegistrationSucceeded)//&& line.SIPAccount.RegistrationRequired { var subscription = line.Subscription.Create(SIPEventType.MessageSummary); subscription.NotificationReceived += MWISubscription_NotificationReceived; _subs.TryAdd(line, subscription); line.Subscription.Subscribe(subscription); } OnPhoneLineStateChanged(line); OnPropertyChanged("SelectedLine.RegisteredInfo"); }
private void phoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { Log.Write("Phone line state changed to " + e.State); }
/// <summary> /// This will be called when the state of a phone line has changed. /// </summary> private void Line_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { IPhoneLine line = sender as IPhoneLine; if (line == null) return; RegState state = e.State; // registration succeeded, subscribe for MWI if (state == RegState.RegistrationSucceeded) { var subscription = line.Subscription.Create(SIPEventType.MessageSummary); subscription.NotificationReceived += MWISubscription_NotificationReceived; line.Subscription.Subscribe(subscription); } OnPhoneLineStateChanged(line); OnPropertyChanged("SelectedLine.RegisteredInfo"); }
private void phoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { Log.Write("Phone line state changed to " + e.State); }
private void phoneLine_PhoneLineStateChanged(object sender, RegistrationStateChangedArgs e) { StateMessageChanged?.Invoke(e.State == RegState.RegistrationSucceeded ? "Online" : e.State.ToString()); }
/// <summary> /// Occurs when phone line state has changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void phoneLine_PhoneLineInformation(object sender, RegistrationStateChangedArgs e) { phoneLineInformation = e.State; Console.WriteLine("Register name:" + ((IPhoneLine)sender).SIPAccount.RegisterName); if (e.State == RegState.RegistrationSucceeded) { Console.WriteLine("Registration succeeded. Online."); OnRegistrationSucceded(); } else { Console.WriteLine("Current state:" + e.State); } }
private void PhoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { }
private void PhoneLine_RegistrationStateChanged(object sender, RegistrationStateChangedArgs e) { throw new NotImplementedException(); }
internal static void sipAccount_RegStateChanged(object sender, RegistrationStateChangedArgs e) { main.regStateChanged(e); }
void line_RegStateChanged(object sender, RegistrationStateChangedArgs e) { if (e.State == RegState.NotRegistered || e.State == RegState.Error) message = ("Registration failed!"); if (e.State == RegState.RegistrationSucceeded) { message = ("Registration succeeded - Online!"); CreateCall(); } }