How to implement VoIP PBX Voice Mail using C#?
Ozeki VoIP SIP SDK provides professional technology to create a virtual PBX extension for voicemail purposes in your PBX system. Read this article and use the source codes to start implementing this solution efficiently.
What is Voicemail? How does it work?
Private Branch Exchange (PBX) systems are used for phone line establishment between communicating end points, regardless of wired, mobile or VoIP technology they use. The end points are registered to the PBX through a SIP account and are called extensions. The PBX can also have virtual extensions that are not attached to physical or software communication solutions but used for some special purposes.
Voicemail systems are designed to convey a caller's recorded audio message to a recipient. To do so they contain a user interface to select, play, and manage messages; a delivery method to either play or otherwise deliver the message; and a notification ability to inform the user of a waiting message.
The virtual extension definition needs some basic modification in the PBX class code. The main change is the usage of the extension container. This tool is needed for the virtual extension handling. When you got the extension handler provided by the Ozeki VoIP SIP SDK, you can add any virtual extensions to it with a specific SIP account.
When an extension does not answer a call, the PBX will redirect that to the Voicemail extension that automatically answers the call and records a voice message from the caller.
How to implement voicemail using C#?
The Voicemail is a virtual extension that needs to be defined in a class derived from the IExtension interface. The extension needs to handle the contact information as the system needs to know which extension wants to listen their messages or leave a message to the called party.
The actual voicemail calls are handled in separate classes. The call needs to be subscribed for the call state changed event that is implemented in the constructor of the class.
The event handler method of the call state change is implemented in the method. There are different cases that need to be handled in case of an incoming call (Ringing call state). In case of any problems like missing caller or callee data, the call is rejected.
The recorded audio file will be stored in a folder with the name of the called extension and the file name will contain the name of the caller.
PBX Voicemail example in C#
You can find a well-detailed step-by-step guide with an example at the Training chapter's Voicemail article. You can find there how to create a virtual voicemail extension, how to implement simple and advanced features of the application, how to handle different tasks an call states etc.
Related Pages
- Overview for PBX development: PBX development guides
- Setup Ozeki VoIP SIP SDK efficiently: Quick start guide
- How to develop custom VoIP PBX functionality
- How to connect PBX to outside world
- Download Ozeki VoIP SIP SDK form the Ozeki VoIP SIP SDK download page
- You can find licensing information of Ozeki VoIP SIP SDK on Pricing and licensing information page
More information
- How to build simple pbx in csharp using Ozeki voip sip sdk
- How to connect voip pbx to the outside world
- Default voip pbx functionalities in csharp
- How to manage voip pbx authentication settings in csharp using Ozeki voip sip sdk
- How to manage dial plans using voip pbx in csharp
- How to implement voip pbx voice mail in csharp using Ozeki voip sip sdk
- VoIP PBX MediaGateway connection