sábado, 9 de junio de 2012

### MANUAL ASTERISK 1.8 + OpenR2 + Sangoma ###


< DEPENDENCIAS >
apt-get update
apt-get upgrade
apt-get install bison libssl-dev zlib1g-dev libnewt-dev make libtool
apt-get install libncurses5-dev libvorbis-dev automake mysql-server mysql-client mysql-admin libmysqlclient15-dev
apt-get install php5 php5-cli php5-common php5-dev curl libgnutls13 libgnutls-dev libtiff4-dev
apt-get install linux-kernel-devel libasound2-dev libportaudio-dev libportaudio2 jackd
apt-get install unixodbc unixodbc-bin unixodbc-dev speex libspeex-dev
apt-get install linux-headers-`uname -r` build-essential
apt-get install gcc gcc-c++
apt-get install libxml2-utils libxml2-dev libtiff4 libtiff4-dev mysql-client libmysqlclient15-dev mysql-server php5 php-pear php5-gd php5-mysql php5-cli perl libaudiofile-dev curl
apt-get -y install gcc g++ automake autoconf libtool make libncurses5-dev flex bison patch libtool autoconf linux-headers-$(uname -r) sqlite3 libsqlite3-dev 


< DESCARGAS >
Asterisk:
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.13.0.tar.gz
O la version mas reciente.


DahDi:
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.6.1+2.6.1.tar.gz


WanPipe:
wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.27.tgz


OpenR2:
wget http://openr2.googlecode.com/files/openr2-1.3.2.tar.gz


< DESCOMPRIMO >
tar -xvzf asterisk-1.8.13.0.tar.gz
tar -xvzf dahdi-linux-complete-2.6.1+2.6.1.tar.gz
tar -xvzf chan_ss7-2.0.0.tar.gz
tar -xvzf libpri-1.4.12.tar.gz 
tar -xvzf wanpipe-3.5.27.tgz
tar -xvzf openr2-1.3.2.tar.gz


## Verifico que la placa este conectada y detectada ##
lspci | grep Net


< INSTALO DAHDI >
cd dahdi-linux-complete-2.6.1+2.6.1
make
make install
make config


< INSTALO WANPIPE >
cd /usr/src/wanpipe-3.x
./Setup install


## DENTRO DEL MENU DE INSTALACION DE WANPIPE ##
IMPORTANT:
It is always recommended to say YES to all options
prompted during the install!
Please visit: http://wiki.sangoma.com for more info.
Would you like to install WANPIPE now? [y] (y/n) y


----------------------------------------------------------
WANPIPE v3.5.20 Installation Script
Copyright (c) 1995-2010, Sangoma Technologies Inc.
----------------------------------------------------------
Please Select Compilation Mode
1. WAN Protocols Support
Protocols: Frame Relay, CHDLC, PPP, ATM, X25, ADSL, TDM API
Default for: Wan Routing, Data & Voice API devel.
2. TDM Voice (Dahdi/Zaptel) Support
Protocols: TDMV (Dahid/Zaptel), TDM API on AFT adatpers.
Default for: Asterisk & CallWeaver
3. TDM Voice (Dahid/Zaptel) + WAN Protocol Support
4. SMG (SS7) (Default for Asterisk SMG/SS7 install)
5. SMG (SS7) + TDM Voice (Dahdi/Zaptel)
Default for: Asterisk SS7 + PRI
6. SMG (BRI) (Default for Asterisk SMG/BRI install)
7. SMG (BRI) + TDM Voice (Dahdi/Zaptel)
Default for: Asterisk BRI + PRI + Analog
8. SMG (PRI) (Default for Asterisk SMG/PRI install)
9. SMG (PRI) + TDM Voice (Dahdi/Zaptel)
Default for: Asterisk SMG/PRI + Analog
10. TDM API
Protocols: TDM API on AFT adapters:
Default for: FreeSwitch, Yate, Sunrise
Custom voice development
11. Custom Compilation Mode
Specify protocols to be added into the WANPIPE
kernel drivers.
Please select (1-11) [Default: 1]: 1
----------------------------------------------------------
WANPIPE v3.5.20 Installation Script
Copyright (c) 1995-2010, Sangoma Technologies Inc.
----------------------------------------------------------
Looking for zaptel/dahdi directory in /usr/src ...
-------------------------------------------
1 : /usr/src/IPBX/dahdi-linux-2.4.1.2
------------------------------------------
------------------------------------------
m : Enter zaptel path manually
(ctrl-c to Exit)
Please select working zaptel directory [1-1][m]: 1


< CONFIGURAR PLACA >
[root@asterisksangoma wanpipe-3.5.20]# wancfg_dahdi
########################################################################
# Sangoma Wanpipe #
# Dahdi/Zaptel/SMG/TDMAPI/BOOT Configuration Script #
# v2.39 #
# Sangoma Technologies Inc. #
# Copyright(c) 2009. #
########################################################################
Would you like to generate /etc/asterisk/chan_dahdi.conf
1. YES
2. NO
[1-2]:1


Select media type for AFT-A101 on port 1 [slot:0 bus:7 span:1]
1. T1
2. E1
3. Unused
4. Exit
[1-4]:2


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
Select clock for AFT-A101 on port 1 [slot:0 bus:7 span:1]
1. NORMAL
2. MASTER
[1-2]: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


Removing existing wanrouter boot scripts...OK
Would you like wanrouter to start on system boot?
1. YES
2. NO
[1-2]:1


[root@asterisksangoma wanpipe-3.5.20]# wanrouter start
Starting up device: wanpipe1
--> Loading ec image OCT6116-64S.ima...
Configuring interfaces: w1g1
done.
[root@asterisksangoma wanpipe-3.5.20]# wanrouter list
Devices currently active:
wanpipe1
[root@asterisksangoma wanpipe-3.5.20]# wanrouter status
Devices currently active:
wanpipe1
Wanpipe Config:
Device name | Protocol Map | Adapter | IRQ | Slot/IO | If's | CLK | Baud rate |
wanpipe1 | N/A | A101/1D/A102/2D/4/4D/8| 169 | 0 | 1 | N/A | 0 |
Wanrouter Status:
Device name | Protocol | Station | Status |
wanpipe1 | AFT TE1 | N/A | Disconnected |


< INSTALAMOS OPENR2 >
cd openr2-1.3.2
./configure --prefix=/usr
make
make install


< INSTALAMOS ASTERISK >
cd asterisk-1.8.11.0/
./configure
make menuselect
** No nos olvidemos de seleccionar la opcion de agregar el CDR por MySQL **
make
make install
make samples
make config


## Vemos la configuracion de la placa ##
dahdi_cfg -vv


## Verificamos dentro de Asterisk que todos los canales esten listos ##
mfcr2 show channels
dahdi show channels

1 comentario: