Tags

, , , ,

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);

asterisk - using wget to get libsrtp

After extracting,

asterisk - extract libsrtp

Configure, make and install libsrtp.

asterisk - libsrtp configure

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.

asterisk - libsrtp make

asterisk - libsrtp make install

Time dependent operations require ntp, so install ntp.

asterisk - installing ntp

Then get other libraries that are required in Asterisk build.

asterisk - get necessary packages

Now lets get latest Asterisk itself,

asterisk - using wget to get asterisk

We start configuring Asterisk with ssl support.

asterisk - configure with srtp

If libsrtp library was build successfully, we should end with Asterisk logo.

asterisk - successful configuration outputs asterisks logo

make menuselect to choose build options,

asterisk - make menuselect

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.

asterisk - menuselect build options

asterisk - menuselecting res_srtp

asterisk - menuselecting core sound packages

Now we are ready to build Asterisk,

asterisk - make

make install completes installation. This may take same time as sound packages are downloaded.

asterisk - make install

asterisk - installation is complete

Last step in Asterisk installation will be generating sample configuration files.

asterisk - make samples

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.

asterisk - addition to sipconf

this file also give clue about Asterisk debug options relating to sip clients,

asterisk -sip debug commands

Changes will take affect after reloading sip module

asterisk - sip reload and debug

Now prepare a dialing entry at /etc/asterisk/extensions.conf

asterisk - addition to extensions conf

reload dial plan to make changes effective,

asterisk -dialplan reload

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;

asterisk - ekiga setup

asterisk - ekiga preferences

We may check registration state of our phone with sip debug commands presented above

asterisk - sip show peers

Now echo test may be performed by dialing extension 100@192.168.126.129

asterisk - ekiga dialing

codec can be checked using wireshark

asterisk - confirmation at wireshark

Now, since I have a g722 pcap, I may check operation of newly implemented g722 recording feature of Sistas SVR.

asterisk - testing svr by g722 call

Advertisements