Saturday, 6 January 2018

How to install Asterisk installation with Sangoma card


install asterisk with Sangoma PRI card in Centos 6.9

yum update -y

yum -y install gcc gcc-c++ kernel-devel bison openssl openssl-devel perl perl-Net-SSLeay perl-Crypt-SSLeay libtermcap-devel ncurses-devel doxygen curl-devel newt-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron speex speex-devel unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel mysql-server php-mysql php-mbstring php-mcrypt flex screen libtiff-devel libxml2-devel uuid

cd /usr/src
wget http://www.digip.org/jansson/releases/jansson-2.10.tar.gz
tar -zxvf jansson-2.10.tar.gz
cd jansson-2.10
./configure
make
make check
make install
cd ..
wget http://www.sqlite.org/2016/sqlite-autoconf-3100000.tar.gz
tar -zxvf sqlite-autoconf-3100000.tar.gz
cd sqlite-autoconf-3100000
./configure
make
make install
cd ..
yum install uuid* -y
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz 
tar -zxvf dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-2.11.1+2.11.1
make
make install
make config
cd ..
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
tar -xvzf libpri-current.tar.gz
cd libpri-1.6.0*
make
make install
cd ..
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz
tar -zxvf asterisk-15-current.tar.gz
cd asterisk-15.0.0/
yum -y install patch
./configure
make
make install
make samples
make config
service asterisk stop
ln -s /usr/local/lib/libjansson.so.4 /usr/lib/libjansson.so.4
echo /usr/bin > /etc/ld.so.conf.d/asterisk.conf
ldconfig
cd ..
wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-current.tgz
tar -zxvf wanpipe-current.tgz
cd wanpipe-7.0.23/

 ./Setup install


The run the command “./Setup install “,if it prompts yes press “y” and proceed to the
next level.
9. would you like to generate /etc/asterisk/chan_dahdi.conf
1. YES
2. NO
[1-2]:1
Configuring port 1 on A101 slot:4 bus:4.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
Select media type for AFT-A101 on port 1 [slot:4 bus:4 span:1]
1. T1
2. E1
3. Unused
4. Exit
[1-4]:2 -- -- -- - if your connection is T1 then enter 1 mine is E1 (india)
Configuring port 1 on 101 as E1, line coding:HDB3, framing:CRC4
1. YES - Keep these settings
2. NO - Configure line coding and framing
[1-2, ENTER='YES']:1
note: for the above you need to ask your provider for the detaisl like crc4 is enable
to disable based on that u need to enter
Select clock for AFT-A101 on port 1 [slot:4 bus:4 span:1]

1. NORMAL
2. MASTER
[1-2]:2
Select signalling type for AFT-A101 on port 1 [slot:4 bus:4 span:1]
1. Zaptel/Dahdi - PRI CPE
2. Zaptel/Dahdi - PRI NET
3. Zaptel/Dahdi - E & M
4. Zaptel/Dahdi - E & M Wink
5. Zaptel/Dahdi - FXS - Loop Start
6. Zaptel/Dahdi - FXS - Ground Start
7. Zaptel/Dahdi - FXS - Kewl Start
8. Zaptel/Dahdi - FX0 - Loop Start
9. Zaptel/Dahdi - FX0 - Ground Start
10. Zaptel/Dahdi - FX0 - Kewl Start
11. Sangoma SMG/sangoma_prid- PRI CPE
12. Sangoma SMG/sangoma_prid- PRI NET
[1-12]:1
note: if the line is from the provider select 1 , if you are connecting card to leagal
epabx then give 2
Select switchtype for AFT-A101 on port 1
1. National ISDN 2
2. Nortel DMS100
3. AT&T 4ESS
4. Lucent 5ESS
5. EuroISDN
6. Old National ISDN 1
7. Q.SIG
[1-7]:1
Configuring port 1 on AFT-A101 as a full E1
1. YES - Use all channels
2. NO - Configure for fractional
[1-2, ENTER='YES']:1
Select dialplan context for AFT-A101 on port 1
1. from-pstn
2. from-internal
3. Custom
[1-3]:1 -- -- -- mine is freepbx so i selected from-pstn , if yours is different then select
custom and enter your incomming context
Input the group for this port
:0 -- -- i have give zero , if you want the group name 1 then give 1
this is based on how you write your outgoing dialplan
Port 1 on AFT-A101 configuration complete...
Press any key to continue:
T1/E1 card configuration complete.

Press any key to continue:
Configuration Complete! Please select following:
1. YES - Continue
2. NO - Exit
[1-2]:1
Dahdi and Wanpipe configuration complete: choose action
1. Save cfg: Restart Asterisk & Wanpipe now
2. Save cfg: Restart Asterisk & Wanpipe when convenient
3. Save cfg: Stop Asterisk & Wanpipe now
4. Save cfg: Stop Asterisk & Wanpipe when convenient
5. Save cfg: Save cfg only (Not Recommanded!!!)
6. Do not save cfg: Exit
[1-6]:1
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:1
Would you like to execute 'dahdi_cfg' each time wanrouter starts?
1. YES
2. NO
[1-2]:1
end of wanroute configuration
Now you need to check pri status ,
1. type dahdi_cfg -- this shows does the card configured properly or not , shows the
channels configured
2. go to asterisk cli
asterisk -vvvvr
dahdi show status
dahdi show channels
pri show spans


No comments:

Step-by-step OpenLDAP Installation and Configuration on server

This tutorial describes how to install and configure an OpenLDAP server and also an OpenLDAP client. Step by Step Installation and Conf...