Sunday, April 26, 2009

Asterisk + SS7

From last few days I am trying to set up Asterisk + SS7 with Sangoma A102 card on my Ubuntu 8.04 machine. This being my first time with Asterisk I was bit skeptical of things and was wondering if it will be smooth? Well, it wasn't really out-of-box, but it wasn't tough either. Here I will try to explain step-by-step of what I did, challenges I faced and solution for same.

First of all keep in mind that Zaptel module is now renamed to Dahdi. It really took some time for me to understand this and I was wondering if I need Zaptel or Dahdi. This might be very trivial for people who are into Asterisk, but for some one like me who has just started, especially after reading 'Asterisk - The future of Telephony' book where they always talk about Zaptel, it wasn't easy to make out that Dahdi is latest version of Zaptel. Follow the announcement here

To have Asterisk + SS7 you need following modules

  1. LibSS7
  2. Dahdi
  3. Asterisk

Even before you start on installation of these modules, there are few linux specific modules that needs to be installed in your machine.

#sudo apt-get install build-essential
#sudo apt-get install linux-headers-`uname -r`
#sudo apt-get install libssl-dev
#sudo apt-get install ncurses-dev
#sudo apt-get install libnewt-dev
#sudo apt-get install zlib1g-dev
#sudo apt-get install bison

In addition I also followed the packages explained in book 'Asterisk - The future of Telephony'. look at Table 3.1

Next download the source code for libss7 (this is still not available as binary). Remember you need to download the Branch 1.0 and *not* Trunk. Follow the forum entry

Check out src code to your /usr/src svn co

Next call 'make' and then 'sudo make install'. Thats it! libss7 is installed.

Check out dahdi linux trunk src (there is also dahdi-tools) to /usr/src

svn co

I renamed /usr/src/trunk to /usr/src/dahdi-trunk. But really it doesn't matter. Go to this dir and call 'make' and 'sudo make install' and your dahdi is installed

Dahdi Tools
Check out dahdi-tools trunk src to /usr/src

svn co

Go to this dir call './configure' and 'make menuselect'. This will open up UI where you can select modules that you want. I just called 'Save & Exit'. Next call 'make' and 'sudo make install' This will install the dahdi tools for you.

Download the Asterisk from to /usr/src. Un-tar it and go to parent dir. Call './configure' You should see in console output that libss7 is selected. Call 'make menuselect'. In this under 'Channel Drivers' header you should see 'chan_dahdi' selected (* against it) This means libss7 is good! Just call 'Save & Exit'. Next execute 'make' command and then 'sudo make install'. If everything is good, Asterisk is installed for you!

So far we just talked about Asterisk side of the world. But for Asterisk to talk to your Sangoma Hardware you need to install the wanpipe drivers. I downloaded the beta version from Sangoma site and trying it out now. Will blog about Sangoma experience in next blog!

I also tried chan_ss7 instead of Asterisk libSS7 for Asterisk support of SS7, but realized chan_ss7 is not compatible with Asterisk 1.6.x.

Found a very good article on this and worth reading

Stay Tunned!


Anonymous said...

good job!

I included your tutorial on my technology website -

amit.bhayani said...


Anonymous said...

very nice tutorial.
i need system.conf and chan_dahdi.conf values. can you tell me what to set in these two files.
Shoieb Arshad

amit.bhayani said...

Thanks Shoieb. I am still working on config files. Will post my understanding of it and how to configure as soon as I am done.

Anonymous said...

Hello Amit
Can you pl provide installation instruction on Asterisk with Dialogic cards (E1/T1)?


Ahsan Ali said...

Hello Amit
This article proved to be very usefull for me, can you please send me the system.conf and chan_dahdi.conf files at

Bipin said...

good post amit..i just want to know does your E1 made up with lib ss7 if yes what are the commands to test the status...??

amit.bhayani said...

Hi Bipin,

I didn't go further in this front. Regarding Mobicents Support for SS7, yes we do have plan to support SS7 soon. You can find the roadmap at

The presentation for MMS SS7 is at

Fawzi said...

Hi ,

i install two TE110P cards and they work fine :

DAHDI Version:
DAHDI Tools Version -
libss7 Version : 1.0

i need help about chan_dahdi.conf , what is the parameters to configure <> with value 3.1 khz audio instead of the default value <> .


virtual web hosting said...


is there anyone can help me testing ss7 ? as calls working fine but they telco people need testing cases done like call transfer etc so this testing cases i am unable to done anyone can help me ? i can pay money as well my project stuck only on testing cases only i did done rest of thing and calls working fine

webomlinux at gmail dot com


Onlinestores said...

Get the ultimate version from