CENTOS 6.8 and Asterisk 11.x Install (with dahdi card)
---After the install if dahdi is not present in the asterisk cli then do the following:
service asterisk stop
service dahdi stop
--Go to Dahdi directory
make Install
make config
--Go to Dahdi tools directory
make install
reboot
--Go to Asterisk Addons directory
./configure
or ./configure --libdir=/usr/lib64 (for 64bit system)
make install
--Go to Asterisk 1.6.x.x directory
./configure
or ./configure --libdir=/usr/lib64 (for 64bit system)
make install
make config
service asterisk stop
service dahdi stop
service dahdi start
service asterisk start
---end After the install if dahdi is not present in the asterisk cli then do the following:
CENTOS 6.8 and Asterisk 11.x Install Part 1
1. Download CENTOS 6.8 Minimal Install ISO
2. Burn to CD/DVD
3. Boot PC on CD/DVD
4. Install OS
5. After Install reboot
6. Verify hostname
# hostname
7. Setup Network
# cd /etc/sysconfig/network-scripts
- change ifcfg-eth0 file to reflect like the following example below. Your UUID and HWADDR should not be changed. Below is just an example.
DEVICE=eth0
HWADDR=00:12:3F:B8:CD:FF
TYPE=Ethernet
UUID=d960e22d-214f-450c-b017-a3ad590bb225
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=x.x.128.8
NETMASK=255.255.255.0
GATEWAY=x.x.128.1
BROADCAST=x.x.128.255
DNS1=x.x.1.10
DNS2=x.x.1.12
8. Restart network services
# services network restart
9. Run ifconfig, ping from remote machine to server, and ping google.com from server to verify. Now you can ssh in from your workstation10. update new install
# yum update –y
11. Disable SELinux
# vi /etc/selinux/config
and chang to:
and chang to:
SELINUX=disabled
12. Stop iptables
# service iptables stop
13. Prevent iptables from auto starting
# chkconfig iptables off
14. Reboot
# reboot
Setting up NTP in Centos 6.8
First we need to make sure we have the correct date, time, and timezone. You can verify with:# cat /etc/localtime
Set your time zone with (for Phoenix AZ USA)
#cp /usr/share/zoneinfo/America/Phoenix /etc/localtime
Now check date
# date
Sun Mar 29 01:10:44 MST 2015
You can verify this at the hardware level with:
# hwclock -r
Sun 29 Mar 2015 01:13:51 AM MST -0.156631 seconds
If these are incorrect then we can set the OS first and then update the hardware with the date command. The syntax is: date "day month year hh:mm:ss" So if we wanted to change this to March 2 2015 at 1:00pm we would use:
# date -s "2 MAR 2015 13:00:00"
When we have the date correct in the OS we can update the hardware with:
# hwclock -w
Now that we have the correct date and time lets install and setup ntp. First lets install ntp if not already installed.
# yum -y install ntp*
Next edit the the ntp.conf file so we are using the correct time servers.
# vi /etc/ntp.conf
I usually use the public servers from the pool.ntp.org project of:
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
After you have those in lets start the service and make sure it is on in startup.
# service ntpd start
Starting ntpd: [ OK ]
# chkconfig ntpd on
Now lets verify the setup by looking at our peers.
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*deekayen.net 209.51.161.238 2 u 43 64 3 75.257 -22.456 3.017
origin.towfowi. 204.9.54.119 2 u 43 64 3 31.405 -14.629 2.683
NTP2.playallian 129.6.15.30 2 u 43 64 3 50.576 -14.090 3.465
sola-dal-09.ser 10.0.77.54 4 u 42 64 3 59.879 -1.507 2.629l
CENTOS 6.8 and Asterisk 11.x Install Part 2
1 Installation of Basic Dependencies
Asterisk 11.15.0 requires some prerequisite dependencies. Here is the command line to install them:
# yum -y install gcc ncurses-devel libtermcap-devel kernel-devel gcc-c++ newt-devel zlib-devel unixODBC-devel libtool make wget libuuid-devel libxml2-devel sqlite sqlite-devel
# yum -y install kernel-devel-$(uname -r)
# yum -y groupinstall "Development Tools"
# yum -y groupinstall "Development Tools"
# reboot
2 Downloading Your Asterisk Source Code
Move to directory /usr/src by given command:
# cd /usr/src/
Now download the Source Code tar balls using these commands (one by one or at a time):
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.6.3-rc1+2.6.3-rc1.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.5.0.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
3 Extraction of Downloaded Files
Extract the downloaded tar balls to their corresponding directories using:
# tar -zxvf dahdi-linux-complete*
# tar -zxvf libpri*
# tar -zxvf asterisk*
# tar -zxvf libpri*
# tar -zxvf asterisk*
4 DAHDI Installation
DAHDI (Digium Asterisk Hardware Device Interface) can be installed using the command line:
# cd /usr/src/dahdi-linux-complete*
# make && make install && make config
# make && make install && make config
5 LibPRI Installation
In order to enable your BRI, PRI and QSIG based hardware, you will be needing PRI Library or LibPRI. You can install these libraries using:
# cd /usr/src/libpri*
# make && make install
# make && make install
6 Changing Asterisk Directory
Now you have to move back to the Asterisk Installation Directory:
# cd /usr/src/asterisk*
7 Running Configure Script for Asterisk
At
this point, you need to know your CentOS 6 Architecture (32 or 64 Bit).
In many cases you are aware of it. In case you are not, try this
command:
# uname -a
For 32 Bit, you will be getting response like:
2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 GNU/Linux
For 64 Bit, system will respond with something like:
2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Based on your OS Architecture, go ahead with these commands for Asterisk Configuration Script. During the process the asterisk build menu may be displayed. Simply press the esc key one time to exit and continue the install.
For 32 Bit:
# ./configure && make menuselect && make && make install
For 64 Bit:
# ./configure --libdir=/usr/lib64 && make menuselect && make && make install
8 Installing Sample Files
Install Sample Files using:
# make samples
Once done, add the Asterisk Install Script in directory /etc/init.d/ using:
# make config
9 Starting DAHDI
To start DAHDI Device Drivers, use:
# service dahdi start
Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte43x: [ OK ]
wcte12xp: [ OK ]
wcte13xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
wcaxx: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]
Running dahdi_cfg: [ OK ]
Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte43x: [ OK ]
wcte12xp: [ OK ]
wcte13xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
wcaxx: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]
Running dahdi_cfg: [ OK ]
10 Start Asterisk
Finally, start Asterisk:
# service asterisk start
11. Reboot
11. Reboot
# reboot
CENTOS 6.8 and Asterisk 11.x Install Part 3 setting up DAHDI
I am using the Digium
Wildcard TE110P T1/E1 Card into an Adtran 908E. The Adtran has a SIP
trunk to a CLEC. The T1/PRI card in the Asterisk server is used deliver
23 phone channels (1 channel out of the 24 is used for clocking) to/from
the Adtran/Asterisk.
1 Generate system.conf file by running:
# /usr/sbin/dahdi_genconf
My /etc/dahdi/system.conf has the following
# Autogenerated by /usr/sbin/dahdi_genconf on Sun Dec 28 23:00:55 2014
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" (MASTER) ESF/B8ZS
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24
echocanceller=mg2,1-23
# Global data
loadzone = us
defaultzone = us
As it says the above file, “Autogenerated by /usr/sbin/dahdi_genconf”. And “If you edit this file and execute /usr/sbin/dahdi_genconf again, your manual changes will be LOST.”
Now make sure your /etc/asterisk/chan_dahdi.conf has the following, add to end of file: (This will create the channels for you)
context=from-test
switchtype=national
siganling=pri_cpe
group=1
channel => 1-23
2 Now stop and start DAHDI and asterisk
# service asterisk stop
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [ OK ]
# service dahdi stop
Unloading DAHDI hardware modules: done
# service dahdi start
Loading DAHDI hardware modules:
wct4xxp: [ OK ]
wcte43x: [ OK ]
wcte12xp: [ OK ]
wcte13xp: [ OK ]
wct1xxp: [ OK ]
wcte11xp: [ OK ]
wctdm24xxp: [ OK ]
wcaxx: [ OK ]
wcfxo: [ OK ]
wctdm: [ OK ]
wcb4xxp: [ OK ]
wctc4xxp: [ OK ]
xpp_usb: [ OK ]
D: auto '/sys/bus/dahdi_devices/devices/pci:0000:04:00.0'
auto-assign /sys/bus/dahdi_devices/devices/pci:0000:04:00.0
Running dahdi_cfg: [ OK ]
# service asterisk start
Starting asterisk:
3 Now lets verify
# lsdahdi
### Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" (MASTER) ESF/B8ZS
1 PRI Clear (EC: MG2 - INACTIVE)
2 PRI Clear (EC: MG2 - INACTIVE)
3 PRI Clear (EC: MG2 - INACTIVE)
4 PRI Clear (EC: MG2 - INACTIVE)
5 PRI Clear (EC: MG2 - INACTIVE)
6 PRI Clear (EC: MG2 - INACTIVE)
7 PRI Clear (EC: MG2 - INACTIVE)
8 PRI Clear (EC: MG2 - INACTIVE)
9 PRI Clear (EC: MG2 - INACTIVE)
10 PRI Clear (EC: MG2 - INACTIVE)
11 PRI Clear (EC: MG2 - INACTIVE)
12 PRI Clear (EC: MG2 - INACTIVE)
13 PRI Clear (EC: MG2 - INACTIVE)
14 PRI Clear (EC: MG2 - INACTIVE)
15 PRI Clear (EC: MG2 - INACTIVE)
16 PRI Clear (EC: MG2 - INACTIVE)
17 PRI Clear (EC: MG2 - INACTIVE)
18 PRI Clear (EC: MG2 - INACTIVE)
19 PRI Clear (EC: MG2 - INACTIVE)
20 PRI Clear (EC: MG2 - INACTIVE)
21 PRI Clear (EC: MG2 - INACTIVE)
22 PRI Clear (EC: MG2 - INACTIVE)
23 PRI Clear (EC: MG2 - INACTIVE)
24 PRI HDLCFCS
# dahdi_scan
[1]
active=yes
alarms=OK
description=Digium Wildcard TE110P T1/E1 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Digium Wildcard TE110P T1/E1
location=PCI Bus 04 Slot 01
basechan=1
totchans=24
irq=0
type=digital-T1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=B8ZS,AMI
framing_opts=ESF,D4
coding=B8ZS
framing=ESF
Now from asterisk console do:
# asterisk -r
localhost*CLI> dahdi show status
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
Digium Wildcard TE110P T1/E1 Card 0 OK 8 0 0 ESF B8ZS 0 db (CSU)/0-133 feet (DSX-1)
localhost*CLI>
localhost*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State Description
pseudo default default In Service
1 from-test default In Service
2 from-test default In Service
3 from-test default In Service
4 from-test default In Service
5 from-test default In Service
6 from-test default In Service
7 from-test default In Service
8 from-test default In Service
9 from-test default In Service
10 from-test default In Service
11 from-test default In Service
12 from-test default In Service
13 from-test default In Service
14 from-test default In Service
15 from-test default In Service
16 from-test default In Service
17 from-test default In Service
18 from-test default In Service
19 from-test default In Service
20 from-test default In Service
21 from-test default In Service
22 from-test default In Service
23 from-test default In Service
Edit your /etc/asterisk/sip.conf and /etc/asterisk/extensions.conf files and get your phones registered.
CENTOS 6.8 and Asterisk Install 11.x Part 4 Setting up Phones
Edit /etc/asterisk/sip.conf and add the example below, to bottom of file. Substitute phone number you will be using
[6026356915]
type=friend
callerid="Asterisk 100" 6026356915
secret=password
context=internal
host=dynamic
allow=all
dtmfmode=rfc2833
Edit /etc/asterisk/extensions.conf and add the following to end of file
[internal]
;used to pass special character’s to DAHDI (T1/PRI)
exten => _[*#0-9]!,1,Dial(DAHDI/g1/${EXTEN})
exten => _[*#0-9]!,n,Hangup
;used to pass numbers dialed to DAHDI (T1/PRI)
exten => _X.,1,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup
;used to pass extension dialed, 100, to registered phone of 6026356915
exten => 100,1,Dial(SIP/6026356915,20)
exten => 100,n,Playback(vm-goodbye)
exten => 100,n,Hangup
;this is what we used in chan_dahdi.conf
[from-test]
exten => 6026356915,1,Dial(SIP/6026356915,20)
exten => 6026356915,n,Playback(vm-goodbye)
exten => 6026356915,n,Hangup
Go to the asterisk console:
# asterisk –r
Issue command:
localhost*CLI> core reload
This will reload asterisk modules and reflect your changes.
Setup phone and register. Verify by:
localhost*CLI> sip show peers
Watch messages with
localhost*CLI> core set verbose 99
END
No comments:
Post a Comment