Sipek Software Development Kit
SipekSDK is a small VoIP Software Development Kit written in C#. The goal of SipekSDK is to offer simple and easy to use API for VoIP developers. Current release supports SIP interface only via excellent pjsip protocol stack. With SipekSDK developers have three different entry points to start with SipekSDK. The choice depends on how much functionality you need to be handled by SipekSDK. The lowest layer is a direct API to pjsipDll with little or no additional business logic, while the highest layer has integrated call control logic and more.
Design
SipekSDK follows the design principles described in previous chapters. It's based on three-layer design: VoIP, Call Control and GUI layer. The first two layers are implemented and ready to provide access to user defined GUIs. The modules described below abstract complex logic and still offer rich set of functionality.
The folder structure:
- Common
- AbstractWrapper.cs
Contains abstract interfaces to VoIP and declares events. - AbstractFactory.cs
Abstract interface containing references to external functions such as: configuration, tone player, voip proxy, timers,... - Mediainterface.cs
- CallLogInterface.cs
- TimerInterace.cs
- CallControl
- CallManager.cs
- CallStateMachine.cs
- CallStates.cs
- Sip
- pjsipWrapper.cs
Concrete VoIP interface implementation (pjsip)
The sources are available at SVN repository:
svn checkout http://sipeksdk.googlecode.com/svn/trunk/ sipeksdkAccess Interface
Access interface is typicaly used by GUI applications. For example, the access interface method is called when user performs an action (i.e. dials a number).
Interfaces that belongs to Access interface (for each layer):
- CallManager.cs: CCallManager public methods
- AbstractWrapper.cs: IVoipProxy and ICallProxyInterface
- VoIP layer: pjsipDll exported functions (all dll_XYZ functions)
See SipekSDK API for details.
Event Interface
Event interfaces define callbacks. Callbacks are typically used to communicate from lower to upper layer. For example, the GUI application needs first to register to available callbacks to receive events (callback) later. The same is true for CallControl, that registers to events from VoIP.
Event interface in SipekSDK (by layer):
The CallControl defines:
- CallStateRefresh ...event that notifies about call state changed in automaton
For other events use VoipProxy interface. Let's show some most popular events:
- AccountStateChanged ...event trigger by VoIP stack when registration state changed.
- BuddyStatusChanged ...event trigger by VoIP stack when buddy status changed
- DtmfDigitReceived ...event trigger by VoIP stack when DTMF is detected
- and many more...
See events in IVoIPProxy interface.
Call Control Design
Below is the simplified UML class diagram of the Call Control module. It's based on State Design Pattern. The CCallManager class handles many call state machine instances (call table). Each instance executes call control in its own state machine.
Previous <- Modules and interfaces
Next -> Programming Guide
