Asterisk SS7 Howto


In this document I will describe initial steps to install Asterisk as SS7 server on Ubuntu. Before Installation. Please make use your ubuntu box has installed build essential to compile C source application. you also need Linux kernel heade rs, bison , libnewt-dev, libssl-dev, ncurses-dev and zlib1g-dev installed. for installing these packages its fine to use apt utility.

sudo apt-get install build-essential linux-headers-`uname -r` install bison libnewt-dev libssl-dev ncurses-dev zlib1g-dev
Compiling Asterisk with ss7 and dahdi support. Download asterisk , asterisk-adons, libss7, dahdi-linux and dahdi-tools.

mkdir ~/asterisk
cd ~/asterisk
wget http://downloads.asterisk.org/pub/telephony/libss7/libss7-1.0.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz

Unpack and install packages you download.

Install libss7

in order to install libss7 follow these steps:

tar -zxvf libss7-1.0.2.tar.gz
cd libss7-1.0.2/
make
make install
install & DAHDI configure system.

cd ..
tar -zxvf dahdi-linux-current.tar.gz
cd dahdi-linux-complete-2.4.xx.xx/
make
make install
make config
now edit /etc/dahdi/system.conf as follwing (i used digum card. )

vi /etc/dahdi/system.conf

span=1,1,0,ccs,hdb3 # 1st E1
bchan=1-15,17-31 # Make sure u skip 16th channel in config to use as voice/bchan.
dchan=16 # 16th cannel of 1st E1 is used for signaling data channel.
echocanceller=mg2,1-15,17-31 # Make sure u skip 16th channel in config to use as voice/bchan.

span=2,0,0,ccs,hdb3 # 2nd E1
bchan=32-62
echocanceller=mg2,32-62

span=3,0,0,ccs,hdb3 # 3rd E1
bchan=63-93
echocanceller=mg2,63-93

span=4,0,0,ccs,hdb3 #4 th E1
bchan=94-124
echocanceller=mg2,94-124

loadzone = us
defaultzone = us
service dahdi start

Install asterisk-1.8

cd ..
tar -zxvf asterisk-1.8-current.tar.gz
cd asterisk-1.8.xx/
./configure
make menuselect # select option u wish to install or leave as default.
make
make install
make samples
cd ..
configure /etc/asterisk/dahdi-channels.conf

edit /etc/asterisk/dahdi-channels.conf as follwing

group=0,12
context=from-pstn
switchtype = national
signalling = ss7
channel => 1-15,17-31
cahnnel => 32-62
cahnnel => 63-93
cahnnel => 94-124

context = default
group = 63
configure /etc/asterisk/chan_dahdi.conf

edit cahd_dahdi.conf as per your numbering series and NSPC (in dec formate).

vi /etc/asterisk/chan_dahdi.conf

[trunkgroups]

[channels]

ss7type = itu
ss7_called_nai = national
ss7_calling_nai = national
ss7_internationalprefix = 00
ss7_nationalprefix = 0
ss7_subscriberprefix = 0231
ss7_unknownprefix =
internationalprefix = 00
nationalprefix = 0
localprefix = 0231
privateprefix = 023145
unknownprefix =
internationalprefix = +
nationalprefix = +92
localprefix = +92231
privateprefix = +9223145
unknownprefix =

language=en
context=ss7
switchtype=euroisdn
signalling=ss7
toneduration=100
usecallerid=yes
callwaiting=yes
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
group=1
callgroup=1
pickupgroup=1

linkset=1
pointcode=8888 ; switch point code
adjpointcode=9999 ; peer point code.
defaultdpc=9999 ; per point code.
networkindicator=national
mtp2=16
sigchan=16

group= 1 ; local traffic
language=en
context=local
switchtype=euroisdn
pridialplan=local
prilocaldialplan=local
signalling=ss7
toneduration=100
usecallerid=yes
callwaiting=no
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
callgroup=1
pickupgroup=1
cicbeginswith = 1
channel = 1-15
cicbeginswith = 17
channel = 17-31

group= 2 ; national traffic
language=en
context=national
switchtype=euroisdn
pridialplan=local
prilocaldialplan=local
signalling=ss7
toneduration=100
usecallerid=yes
callwaiting=no
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
callgroup=1
pickupgroup=1
cicbeginswith = 33
channel = 32-62

group= 3 ; Mobile traffic
language=en
context=mobile
switchtype=euroisdn
pridialplan=local
prilocaldialplan=local
signalling=ss7
toneduration=100
usecallerid=yes
callwaiting=no
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
callgroup=1
pickupgroup=1
cicbeginswith = 65
channel = 63-93

group= 4 ; International traffic.
language=en
context=international
switchtype=euroisdn
pridialplan=local
prilocaldialplan=local
signalling=ss7
toneduration=100
usecallerid=yes
callwaiting=no
usecallingpres=no
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
callgroup=1
pickupgroup=1
cicbeginswith = 97
channel = 94-124
NOTE: I have added dummy data in the configuration.

Dial Plan

append following in /etc/asterisk/extensions.conf

[local]
exten => _X.,1,Dial(SIP/${EXTEN},40,g)
exten => _X.,2,HangUP()

[national]
exten => _X.,1,Dial(SIP/${EXTEN},40,g)
exten => _X.,2,HangUP()

[mobile]
exten => _X.,1,Dial(SIP/${EXTEN},40,g)
exten => _X.,2,HangUP()

[international]
exten => _X.,1,Dial(SIP/${EXTEN},40,g)
exten => _X.,2,HangUP()

[outgoing]
exten => _0231.,1,Dial(DAHDI/g1/${EXTEN},40,Ttg) ; local call on trunk 1
exten => _0{2,4-9}.,1,Dial(DAHDI/g2/${EXTEN},40,Ttg) ; National call on trunk 2 skipred 03 for mobile code
exten => _03.,1,Dial(DAHDI/g3/${EXTEN},40,Ttg) ; Mobile call on trunk 3
exten => _00X.,1,Dial(DAHDI/g4/${EXTEN},40,Ttg) ; International call on trunk 4
exten => h,n,HangUP()
NOTE: For integration of billing system with asterisk and ss7 please contact me kashif@kashifbukhari.com

Advertisements

3 thoughts on “Asterisk SS7 Howto

  1. Kashif Ali Bukhari November 25, 2013 at 2:26 am Reply

    this is writen by me on my site kashifbukhari.com i would appriciate you if you remove this artical from your site as you publish this without my permission

  2. fal June 10, 2014 at 2:01 pm Reply

    what’s a very nice document!!!!! it helps me so much. thank u very much

  3. pahlabi@gmail.com July 24, 2014 at 1:25 pm Reply

    very nice document…Help a lot…..Thanks Kashif Ali Bukhari….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: