Features of OZEKI VoIP SIP SDK 1.9.2
Easy to use: You can use the NuGet Package Manager to download and update the project. You can also find examples and documentation on the official website.
Powerful: You can access low-level SIP messages and customize them according to your needs. You can also use advanced features, such as encryption, NAT traversal, codec management, audio processing, video processing, and more.
Flexible: You can use OZEKI VoIP SIP SDK with any SIP server or service provider. You can also use it with any audio or video device, such as microphones, speakers, webcams, etc.
Compatible: You can use OZEKI VoIP SIP SDK with any .Net framework version from 3.5 to 4.8. You can also use it with any Windows operating system from XP to 10.
How to use OZEKI VoIP SIP SDK 1.9.2
To use OZEKI VoIP SIP SDK 1.9.2, you need to have Visual Studio 2010 or newer and a PBX installed on your PC (e.g.: Ozeki Phone System). You also need to have a connected softphone or a SIP account to make and receive calls.
After you have installed the NuGet Package Manager, you can download the project by Package Manager Console. You will see the added new VoIP SIP SDK Reference, and two added class files (CallHandlerSample.cs, TestCall.cs). The CallHandlerSample.cs file contains the code for managing making and receiving calls. The TestCall.cs file contains the code for testing the functionality of the project.
The following code snippet shows how to initialize the softphone object and register it to a SIP server:
private void InitializeSoftPhone (string registerName, string domainHost) softPhone = SoftPhoneFactory.CreateSoftPhone ( SoftPhoneFactory.GetLocalIP (), 5700, 5750, 5700); softPhone.IncomingCall += softPhone_IncomingCall; phoneLine = softPhone.CreatePhoneLine (new SIPAccount (true, registerName, registerName, registerName, registerName, domainHost, 5060), new NatConfiguration (NatTraversalMethod.None)); phoneLine.PhoneLineStateChanged += phoneLine_PhoneLineInformation; softPhone.RegisterPhoneLine (phoneLine);
The following code snippet shows how to make a call to a specified number:
private void PickUpButton_Click(object sender, EventArgs e) if (phoneLineInformation == PhoneLineState.RegistrationSucceeded) if (!string.IsNullOrEmpty(dialNumber)) call = softPhone.CreateCallObject(phoneLine, dialNumber); call.CallStateChanged += call_CallStateChanged; call.Start();
The following code snippet shows how to accept an incoming call:
private void softPhone_IncomingCall(object sender, VoIPEventArgs<IPhoneCall> e) InvokeGUIThread(() => MessageBox.Show("Incoming call from: " + e.Item.DialInfo.ToString()); ); call = e.Item; WireUpCallEvents(); call.Answer();
Conclusion
OZEKI VoIP SIP SDK 1.9.2 is a powerful and easy-to-use .Net library that allows you to integrate VoIP and video communication features into your C#.Net applications. It supports the SIP protocol and various audio and video devices. You can use it to create various applications, such as softphones, webphones, PBX systems, IVR systems, call centers, and more. You can download and update the project from the NuGet Package Manager and find examples and documentation on the official website.
References:
[1]
[2]
[3]
a7a7d27f09