void Ozeki() { Console.WriteLine("@@@@@@@@@@@@@@ OZEKI: counter = " + counter); var config = new DirectIPPhoneLineConfig(local_ip, 5060 + counter); phoneLine = softphone.CreateDirectIPPhoneLine(config); //Console.WriteLine("OZEKI: IPPhoneLine Created"); phoneLine.RegistrationStateChanged += line_RegStateChanged; //Console.WriteLine("OZEKI: Po StateChanged, przed IncomingCall"); softphone.IncomingCall += softphone_IncomingCall; //Console.WriteLine("OZEKI: Po IncomingCall"); softphone.RegisterPhoneLine(phoneLine); //Console.WriteLine("OZEKI: po registerPhoneLine"); counter++; /* * try * { * while (!stopCall) * { * * } * } * catch (ThreadInterruptedException exception) * { * // Clean up. * } */ }
public void OzekiInitialization() { softphone = SoftPhoneFactory.CreateSoftPhone(5000, 10000); var config = new DirectIPPhoneLineConfig(local_ip, 5060); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.RegistrationStateChanged += line_RegStateChanged; softphone.IncomingCall += softphone_IncomingCall; softphone.RegisterPhoneLine(phoneLine); }
private void button2_Click(object sender, EventArgs e) { var ipAddress = myIPTxt.Text; var config = new DirectIPPhoneLineConfig(ipAddress, 5060); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.RegistrationStateChanged += line_RegStateChanged; softphone.IncomingCall += softphone_IncomingCall; softphone.RegisterPhoneLine(phoneLine); }
public void phoneLineInitialization() { var config = new DirectIPPhoneLineConfig(local_ip, 5060 + counter); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.RegistrationStateChanged += line_RegStateChanged; softphone.IncomingCall += softphone_IncomingCall; softphone.RegisterPhoneLine(phoneLine); counter++; }
//OZEKI void Ozeki() { softphone = SoftPhoneFactory.CreateSoftPhone(6000, 6200); microphone = Microphone.GetDefaultDevice(); speaker = Speaker.GetDefaultDevice(); mediaSender = new PhoneCallAudioSender(); mediaReceiver = new PhoneCallAudioReceiver(); connector = new MediaConnector(); var config = new DirectIPPhoneLineConfig(local_ip, 5060); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.RegistrationStateChanged += line_RegStateChanged; softphone.IncomingCall += softphone_IncomingCall; softphone.RegisterPhoneLine(phoneLine); }
private void Nasluchuj() { softphone = SoftPhoneFactory.CreateSoftPhone(zalogowanyUzytkownik.AdresIP, 4900, 5100); mediaSender = new PhoneCallAudioSender(); mediaReceiver = new PhoneCallAudioReceiver(); connector = new MediaConnector(); var config = new DirectIPPhoneLineConfig(zalogowanyUzytkownik.AdresIP.ToString(), 5060); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.Config.SRTPMode = Ozeki.Common.SRTPMode.Prefer; phoneLine.RegistrationStateChanged += line_RegStateChanged; phoneLine.SIPAccount.UserName = zalogowanyUzytkownik.login; phoneLine.SIPAccount.DisplayName = zalogowanyUzytkownik.imie + " " + zalogowanyUzytkownik.nazwisko; System.Windows.Application.Current.Dispatcher.Invoke(() => { System.Windows.Application.Current.MainWindow.Title = "SuperIP Phone - " + zalogowanyUzytkownik.login + "@" + zalogowanyUzytkownik.AdresIP + ":" + phoneLine.SIPAccount.DomainServerPort; });//ustawienie nazwy okna softphone.IncomingCall += softphone_IncomingCall; phoneLine.InstantMessaging.MessageReceived += PhoneLine_InstantMessageReceived; softphone.RegisterPhoneLine(phoneLine); foreach (var kodek in softphone.Codecs) { softphone.EnableCodec(kodek.PayloadType); } }
void Glowna(string DocIP) { softphone = SoftPhoneFactory.CreateSoftPhone(5000, 10000); microphone = Microphone.GetDefaultDevice(); speaker = Speaker.GetDefaultDevice(); mediaSender = new PhoneCallAudioSender(); mediaReceiver = new PhoneCallAudioReceiver(); connector = new MediaConnector(); DoceloweIP = DocIP; //Console.WriteLine("Please enter the IP address of your machine: "); //var ipAddress = LocalIP; var config = new DirectIPPhoneLineConfig(LocalIP, 5060); //var config = new DirectIPPhoneLineConfig(textBox1.Text, 5060); phoneLine = softphone.CreateDirectIPPhoneLine(config); phoneLine.RegistrationStateChanged += line_RegStateChanged; softphone.IncomingCall += softphone_IncomingCall; softphone.RegisterPhoneLine(phoneLine); //Console.ReadLine(); }