You are on page 1of 7

Gua de configuracin de FREEPBX+Asterisk 1.

6 +TDM400P+DAHDI
Esta gua es para la instalacin con FREEPBX el cual esta en centos y la tarjeta

TDM400P.

Primero que nada debemos tener instalado en el Kernel el dadhi (osea compilado y listo para poder configurarlo)

Pues empezamos a configurar cosas, y empezamos por DAHDI. Ejecutamos dahdi_scan y veremos que reconoce Dahdi y su estado (actualmente Unconfigured) [root@asterisk ~]# dahdi_scan [1] active=yes alarms=OK description=Wildcard TDM400P REV I Board 5 name=WCTDM/4 manufacturer=Digium devicetype=Wildcard TDM400P REV I location=PCI Bus 00 Slot 10 basechan=1 totchans=4 irq=0 type=analog port=1,FXO port=2,FXO port=3,FXO port=4,FXO
Debe mostrarnos esta informacin tal como vemos en le cuadro

Ahora que sabemos que Dahdi reconoce nuestras placas ah, pasamos a configurarlas. Para eso ejecutamos dahdi_genconf dahdi_cfg -vv Obtendremos una salida similar a sta: DAHDI Tools Version 2.1.0.2 DAHDI Version: 2.1.0.4 Echo Canceller(s): Configuration

====================== SPAN 1: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1) SPAN 2: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1) Channel map: Channel 01: FXO Loopstart (Default) (Echo Canceler: mg2) (Slaves: 01) Channel 02: FXO Loopstart (Default) (Echo Canceler: mg2) (Slaves: 02) Channel 03: FXO Loopstart (Default) (Echo Canceler: mg2) (Slaves: 03) Channel 04: FXO Loopstart (Default) (Echo Canceler: mg2) (Slaves: 04) Changing signalling on channel 1 from FXO Kewlstart to FXO Loopstart Setting echocan for channel 1 to mg2 Changing signalling on channel 2 from FXO Kewlstart to FXO Loopstart Setting echocan for channel 2 to mg2 Changing signalling on channel 3 from FXO Kewlstart to FXO Loopstart Setting echocan for channel 3 to mg2 Changing signalling on channel 4 from FXO Kewlstart to FXO Loopstart Setting echocan for channel 4 to mg2

A partir de aqu ajustaremos la configuracin de Dahdi para adaptarla a nuestras necesidades Editamos /etc/dahdi/modules

vi /etc/dahdi/modules y comentamos todos aquellos drivers que no usamos (todos excepto wctdm y wcb4xxp) # Contains the list of modules to be loaded / unloaded by /etc/init.d/dahdi. # # NOTE: Please add/edit /etc/modprobe.d/dahdi or /etc/modprobe.conf if you # would like to add any module parameters. # # Format of this file: list of modules, each in its own line. # Anything after a # is ignore, likewise trailing and leading # whitespaces and empty lines. # Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1 # Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1 # Digium TE220: PCI-Express dual-port T1/E1/J1 # Digium TE420: PCI-Express quad-port T1/E1/J1 # wct4xxp # Digium TE120P: PCI single-port T1/E1/J1 # Digium TE121: PCI-Express single-port T1/E1/J1 # Digium TE122: PCI single-port T1/E1/J1

# wcte12xp # Digium T100P: PCI single-port T1 # Digium E100P: PCI single-port E1 # wct1xxp # Digium TE110P: PCI single-port T1/E1/J1 # wcte11xp # Digium TDM2400P/AEX2400: up to 24 analog ports # Digium TDM800P/AEX800: up to 8 analog ports # Digium TDM410P/AEX410: up to 4 analog ports # wctdm24xxp # X100P Single port FXO interface # X101P Single port FXO interface # wcfxo # Digium TDM400P: up to 4 analog ports wctdm # Digium B410P: 4 NT/TE BRI ports #wcb4xxp # Digium TC400B: G729 / G723 Transcoding Engine #wctc4xxp # Xorcom Astribank Devices #xpp_usb

A continuacin editamos /etc/dahdi/system.conf vi /etc/dahdi/system.conf # This file is parsed by the Dahdi Configurator, dahdi_cfg # # Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) fxsks=1 echocanceller=mg2,1 fxsks=2 echocanceller=mg2,2 fxsks=3 echocanceller=mg2,3 fxsks=4 echocanceller=mg2,4 # Global data

loadzone defaultzone

= es = es

El siguiente paso a partir de aqu es configurar los canales de la tarjeta RDSI para que sean reconocidos por Asterisk Echemos un vistazo al fichero /etc/asterisk/dahdi_channels.conf vi /etc/asterisk/dahdi-channels.conf ; Autogenerated by /usr/sbin/dahdi_genconf on Tue Apr 10 11:29:34 2012 ; If you edit this file and execute /usr/sbin/dahdi_genconf again, ; your manual changes will be LOST. ; Dahdi Channels Configurations (chan_dahdi.conf) ; ; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended ; to be #include-d by /etc/chan_dahdi.conf that will include the global settings ; ; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) ;;; line="1 WCTDM/4/0 FXSKS" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 1 callerid= group= context=default ;;; line="2 WCTDM/4/1 FXSKS" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 2 callerid= group= context=default ;;; line="3 WCTDM/4/2 FXSKS" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 3

callerid= group= context=default

;;; line="4 WCTDM/4/2 FXSKS" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 4 callerid= group= context=default Pues teniendo estos datos a mano nos vamos a configurar los canales RDSI en Asterisk. Y en primer lugar habilitamos el soporte DAHDI para FreePBX. Editamos /etc/amportal.conf y agregamos al final la siguiente lnea ZAP2DAHDICOMPAT=true Reiniciamos Amportal amportal restart Y ya tenemos soporte DAHDI en FreePbx Ahora empezamos con los RDSI. Comprobaciones previas dc86d8ea6*CLI> dahdi show channels Chan Extension Context Language MOH Interpret Blocked pseudo default default In Service 1 from-pstn default In Service 2 from-pstn default In Service 3 from-pstn default In Service 4 from-pstn default In Service

State

Asterisk interpreta los canales a travs del fichero de configuracin chan_dahdi.conf. Este fichero no existe, as que lo crearemos nosotros. vi /etc/asterisk/chan_dahdi.conf Aadiremos simplemente 3 lneas. [channels] #include dahdi-channels.conf #include chan_dahdi_additional.conf

y creamos el fichero chan_dahdi_additional.conf touch chan_dahdi_additional.conf Con esto configuramos nuestro DADHI con FREEPBX Ahora espesamos con el FREEPBX Pues tenemos extensiones del 1 al 7 y canales RDSI del 13 al 17. Nos vamos a FreePBX desde el explorador y agregamos los enlaces del 13 al 17. Pestaa Trunks -> Add ZAP Trunk (Dahdi compat..) Ah, por ahora, simplemente aadimos el nmero del enlace (del 13 al 17) , uno por cada Trunk que aadimos

Y borramos el enlace ZAP/G0 que aparece por defecto en la instalacin Aplicamos los cambios y nos vamos a la pestaa extensiones. Ah aadiremos las extensiones. Yo para una pequea central como esta usare un plan de tres cifras para las extensiones locales (101,102, etc) Seleccionamos Add generic ZAP Device y pulsamos Add Ahi colocaremos por ahora el numero de extension en los campos User extension y Display Name y el numero de canal zap en Channel, repitiendo el proceso para cada extensin.

Ya tenemos las extensiones y las lneas. Ahora crearemos unas reglas muy bsicas de llamadas.

You might also like