Você está na página 1de 8

INSTALACAO ASTERISK / DAHDI / LIBPRI / VOICERLIB / DGVCHANNEL

==============================================================================
Por Tiago M Carvalho <tiago.carvalho@digivoice.com.br>

release

v0.1
v0.2
v0.3
v0.4
v0.5
v0.6

OBSERVAO:

25-11-2010
02-12-2010
25-02-2011
04-04-2011
31-05-2011
11-06-2011

SE FOR SOMENTE ATUALIZAR/RECOMPILAR A VOICERLIB E DGVCHANNEL


VOC DEVE PARAR O SERVIO ASTERISK E REMOVER OS MDULOS
DGVFIFO E VLIBD, ATUALIZAR/RECOMPILAR OS DRIVERS E REINICIAR O
SERVIO ASTERISK:
service asterisk stop
/etc/init.d/asterisk stop
amportal stop

<== RedHat/Fedora/CentOS
<== Debian/Ubuntu
<== Meucci/Trixbox/Elastix

rmmod dgvfifo
rmmod vlibd

EM SEGUIDADE EXECUTE OS PROCEDIMENTOS 08 E 09.


CASO DE ALGUM ERRO NA COMPILAO VEJA NO OS ITENS DE
"RESOLVENDO PROBLEMAS" NO FINAL DO TUTORIAL.

-----------------------------------------------------------------------------00- INSTALAO DE DEPEDENCIAS FEDORA/REDHAT/CENTOS (execute o comando abaixo):


*** OBS.: Rebootar a maquina pois foi feita atualizao do kernel ***
-----------------------------------------------------------------------------yum -y update kernel
yum -y install kernel-devel \
gcc \
gcc-c++ \
make \
openssl-devel \
libtermcap-devel \
ncurses-devel \
newt-devel \
unixODBC \
unixODBC-devel \
libtool-ltdl \
libtool-ltdl-devel \
libxml2 \
libxml2-devel \
wget

*** REBOOTAR A MAQUINA APOS ESTAS INSTALACOES/ATUALIZACOES ****


-----------------------------------------------------------------------------01- INSTALAO DE DEPEDENCIAS DEBIAN (execute os comandos abaixo):
OBS: *** Se o seu Debian nao for Lenny mudar para sua distro como exemplo
Debian 6.0 mudar para "squeeze" na lista de repositorios. ***
-----------------------------------------------------------------------------cp /etc/apt/sources.list /etc/apt/sources.list.bkp
*** DEPEDENCIAS PARA DEBIAN 5 LENNY ****
---------------------------------------echo "deb http://ftp.br.debian.org/debian/ lenny main" > /etc/apt/source
s.list
echo "deb-src http://ftp.br.debian.org/debian/ lenny main" >> /etc/apt/s
ources.list
echo "deb http://security.debian.org/ lenny/updates main" >> /etc/apt/so
urces.list
echo "deb-src http://security.debian.org/ lenny/updates main" >> /etc/ap
t/sources.list
echo "deb http://volatile.debian.org/debian-volatile lenny/volatile main
" >> /etc/apt/sources.list
echo "deb-src http://volatile.debian.org/debian-volatile lenny/volatile
main" >> /etc/apt/sources.list
*** DEPEDENCIAS PARA DEBIAN 6 SQUEEZE ****
---------------------------------------echo "deb http://ftp.br.debian.org/debian/ squeeze main" > /etc/apt/sour
ces.list
echo "deb-src http://ftp.br.debian.org/debian/ squeeze main" >> /etc/apt
/sources.list
echo "deb http://security.debian.org/ squeeze/updates main" >> /etc/apt/
sources.list
echo "deb-src http://security.debian.org/ squeeze/updates main" >> /etc/
apt/sources.list
echo "deb http://security.debian.org/ squeeze/updates main contrib non-f
ree" >> /etc/apt/sources.list
echo "deb-src http://security.debian.org/ squeeze/updates main contrib n
on-free" >> /etc/apt/sources.list

CONTINUAR NESTE PONTO


--------------------/usr/bin/aptitude -y update
/usr/bin/aptitude -y install linux-headers-`uname -r` \
autoconf \
automake \
binutils \
bison \
bzip2 \

doxygen \
g++ \
g++-4.1 \
gcc \
libc6-dev \
libcurl3 \
libcurl3-dev \
libncurses5 \
libncurses5-dev \
libnewt0.52 \
libnewt-dev \
libogg-dev \
libspeex \
libspeex-dev \
libssl0.9.8 \
libssl-dev \
libvorbis-dev \
libwrap0-dev \
libxml2 \
libxml2-dev \
make \
openssh-server \
openssl \
patch \
pciutils \
procps \
sox \
unixodbc-dev \
vim \
zlib1g-dev

-----------------------------------------------------------------------------02- INSTALAO DE DEPEDENCIAS UBUNTU (execute os comandos abaixo):


-----------------------------------------------------------------------------/usr/bin/aptitude -y update
/usr/bin/aptitude -y install linux-headers-`uname -r`
/usr/bin/aptitude -y install autoconf \
automake \
binutils \
bison \
bzip2 \
g++ \
g++-4.1 \
gcc \
libc6-dev \
libcurl3 \
libcurl3-dev \
libmyodbc \
libncurses5 \
libncurses5-dev \
libnewt0.52 \
libnewt-dev \
libogg-dev \
libspeex \
libspeex-dev \

libssl0.9.7 \
libssl-dev \
libvorbis-dev \
libwrap0-dev \
libxml2 \
libxml2-dev \
make \
mcrypt \
openssh-server \
openssl \
patch \
pciutils \
procps \
sox \
unixodbc-dev \
vim \
zlib1g-dev

-----------------------------------------------------------------------------03- INSTALAO DE DEPEDENCIAS UBUNTU 10.04 (execute os comandos abaixo):


-----------------------------------------------------------------------------/usr/bin/aptitude -y update
/usr/bin/aptitude -y install linux-headers-`uname -r`
/usr/bin/aptitude -y install automake \
binutils \
bison \
bzip2 \
g++ \
g++-4.1 \
gcc \
libc6-dev \
libcurl3 \
libcurl3-dev \
libmyodbc \
libncurses5-dev \
libnewt-dev \
libogg-dev \
libspeex1 \
libspeex-dev \
libssl0.9.8 \
libssl-dev \
libvorbis-dev \
libwrap0-dev \
libxml2 \
libxml2-dev \
mcrypt \
openssh-server \
openssl \
sox \
unixodbc-dev \
vim \
zlib1g-dev
-----------------------------------------------------------------------------04 - COMPILANDO O DAHDI-LINUX E DAHDI-TOOLS

-----------------------------------------------------------------------------cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux
-2.4.1.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools
-2.4.1.tar.gz
tar -zxf dahdi-linux-2.4.1.2.tar.gz
tar -zxf dahdi-tools-2.4.1.tar.gz
ln -s /usr/src/dahdi-linux-2.4.1.2 /usr/src/dahdi-linux
cd /usr/src/dahdi-linux
ATENCAO!!!!
Editar o arquivo /usr/src/dahdi-linux/drivers/dahdi/Kbuild
Descomente as seguintes linhas (retirando o '#' da frentre da linha):
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI)
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY)
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC)

+= dahdi.o
+= dahdi_dummy.o
+= dahdi_dynamic

obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_LOC)

+= dahdi_dynamic

obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETH)

+= dahdi_dynamic

.o
_loc.o
_eth.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETHMF)
_ethmf.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TRANSCODE)
de.o

+= dahdi_dynamic
+= dahdi_transco

Comente as seguintes linhas (colocando um "#" na frente da linha, salve


e saia):
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE12XP)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCB4XXP)

+=
+=
+=
+=
+=
+=
+=

wct4xxp/
wctc4xxp/
wctdm24xxp/
wcte12xp/
wctdm.o
voicebus/
wcb4xxp/

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT1XXP)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE11XP)

+= wct1xxp.o
+= wcte11xp.o

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCFXO)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TOR2)
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_PCIRADIO)

+= wcfxo.o
+= tor2.o
+= pciradio.o

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP)

+= xpp/

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_JPAH)

+= dahdi_echocan

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE)

+= dahdi_echocan

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE2)

+= dahdi_echocan

#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1)

+= dahdi_echocan

_jpah.o
_sec.o
_sec2.o

_kb1.o
#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2)

+= dahdi_echocan

_mg2.o

COMPILE COM:
make clean
make
make install

COMPILANDO O DAHDI-TOOLS
cd /usr/src/dahdi-tools-2.4.1
make clean
./configure
make menuselect
make
make install
-----------------------------------------------------------------------------05. INSTALAR / ATUALIZAR A LIBPRI:
-----------------------------------------------------------------------------cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri1.4.11.5.tar.gz
tar -zxf libpri-1.4.11.5.tar.gz
rm -rf /usr/src/libpri
ln -s /usr/src/libpri-1.4.11.5 /usr/src/libpri
cd /usr/src/libpri
make clean
make
make install
-----------------------------------------------------------------------------06 - COMPILANDO O ASTERISK (MUDE P/ VERSO PARA A QUAL VOC IR UTILIZAR).
-----------------------------------------------------------------------------ATENCAO!!! Se for utilizar **Asterisk 1.8** veja no final do tutorial
"UTILIZANDO ASTERISK 1.8".
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.2
.18.tar.gz
tar -zxf asterisk-1.6.2.18.tar.gz
ln -s /usr/src/asterisk-1.6.2.18 /usr/src/asterisk
cd asterisk
make clean
./configure
make menuselect
make
make install
make samples
make config

-----------------------------------------------------------------------------07 - COMPILANDO O ASTERISK-ADDONS (MUDE P/ A VERS QUE VOC IR UTILIZAR)


-----------------------------------------------------------------------------cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addon
s-1.6.2.3.tar.gz
tar -zxf asterisk-addons-1.6.2.3.tar.gz
cd asterisk-addons-1.6.2.3
./configure
make menuselect
make
make install
make samples
-----------------------------------------------------------------------------08 - COMPILANDO A VOICERLIB
-----------------------------------------------------------------------------cd /usr/src/
wget http://downloads.digivoice.com.br/pub/voicerlib/linux/stable/voicer
lib-4.2.3.0.tar.gz
tar -zxvf voicerlib-4.2.3.0.tar.gz
cd /usr/src/voicerlib-4.2.3.0
make clean
make
make install
make config
-----------------------------------------------------------------------------09 - COMPILANDO O DGVCHANNEL
-----------------------------------------------------------------------------cd /usr/src/
wget http://downloads.digivoice.com.br/pub/dgvchannel/unstable/dgvchanne
l-1.0.8_rc3.tar.gz
tar -zxf dgvchannel-1.0.8_rc3.tar.gz
cd /usr/src/dgvchannel-1.0.8_rc3
make clean
make
make install
make config
make install_config

RESOLVENDO PROBELAMAS:
===============================================================================
- PARA AS SEGUINTES DISTRIBUICOES
(somente se for utilizar dgvchannel nas versoes 1.0.6):
UBUNTU 10.04LTS / 10.10
SLACKWARE 13.x
FEDORA 12
FEDORA 13

OpenSUSE 11.3
Debian (dependendo da versao do kernel)
Adicionar no arquivo dgvchannel-1.0.6/fifodev/dgvfifo.c:
#include<linux/sched.h>
- PARA A DISTRIBUICAO FEDORA 13.X (kernel 2.6.34) (Dahdi 2.4.0)
Adicionar no arquivo dahdi-linux/drivers/dahdi/dahdi_dummy.c
#include<linux/slab.h>
- PARA ASTERISK (ERRO NO ./configure, sem a lib XML)
./configure --disable-xmldoc
- SE A DISTRO FOR 64BITs VERIFICAR SE A LIBPRI ESTA NO DIRETORIO /usr/lib64/.
UTILIZANDO ASTERISK 1.8
===============================================================================
Asterisk 1.8 eh a nova versao do Asterisk da Digium.
Para utilizar com os modulos da Digivoice faa o seguinte:
No TOPICO 06, baixe o asterisk 1.8 ao invs do 1.6.2.X. como exemplo abaixo:
(lembre-se: Asterisk 1.8 no utiliza mais o asterisk-addons).
COMPILANDO O ASTERISK
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.4
.tar.gz
tar -zxf asterisk-1.8.4.tar.gz
ln -s /usr/src/asterisk-1.8.4 /usr/src/asterisk
cd asterisk
make clean
./configure
make menuselect
make
make install
make config
CONTINUAR NOS TOPICOS 08 e 09.

==FIM==