As I work on stuff related to OpenFlow, Voice Recording and Opus, the necessity for a test pbx server become unavoidable, and I decided to prepare a local Asterisk pbx. Asterisk is a well known open pbx that may be obtained from http://www.asterisk.org/downloads. Here is the result of my setup effort;
I used a Debian 7.6 base system for my pbx. Start with getting srtp library. Secure rtp is optional for base Asterisk, however, in order to test webrtc, it should be installed. Unfortunately it is not in wheezy packet manager and should be obtained from project page: http://sourceforge.net/projects/srtp/. Get libsrtp using wget (wget itself may be obtained by apt-get install wget);
After extracting,
Configure, make and install libsrtp.
Here I provided a prefix in order to place generated files of libsrtp to /usr/
directory instead of /usr/local/
/ which is used by default. Asterisk prefers the former one.
Time dependent operations require ntp, so install ntp.
Then get other libraries that are required in Asterisk build.
Now lets get latest Asterisk itself,
We start configuring Asterisk with ssl support.
If libsrtp library was build successfully, we should end with Asterisk logo.
make menuselect
to choose build options,
In menuselect, be sure that res_srtp is selected in resource modules
option. Also, include English sounds files. These will be helpful in generating test pcaps later.
Now we are ready to build Asterisk,
make install
completes installation. This may take same time as sound packages are downloaded.
Last step in Asterisk installation will be generating sample configuration files.
These initial configuration files will be modified in order to make pbx useful. Now lets define a sip extension using G722 as codec and dialing plan for an automatic echo test. This sample message will be used offline in order to test newly implemented G722 feature of Sistas SVR voice recording system…
First modify /etc/asterisk/sip.conf
in order to create a sip agent that uses g722 codec.
this file also give clue about Asterisk debug options relating to sip clients,
Changes will take affect after reloading sip module
Now prepare a dialing entry at /etc/asterisk/extensions.conf
reload dial plan to make changes effective,
For my windows host, I decided to try ekiga softphone from http://ekiga.org/download-ekiga-binaries-or-source-code. Configuration for an account requires credentials of extension 1000 with ip of Asterisk sip server. I modified audio codec choice to force g722 as follows;
We may check registration state of our phone with sip debug commands presented above
Now echo test may be performed by dialing extension 100@192.168.126.129
codec can be checked using wireshark
Now, since I have a g722 pcap, I may check operation of newly implemented g722 recording feature of Sistas SVR.