openr2 asterisk sangoma

27
Asterisk, Sangoma A101 y OpenR2 Mayo 2011 Gabriel Bozada <[email protected]> http://www.trantoriano.net Instalaremos Asterisk, DAHDI, OpenR2 y WANPIPE para configurar un enlace telef´ onico E1 de TELMEX en M´ exico, sera la tercera gu´ ıa r´ apida que hago cada una con distintas tarjetas, Digium y OpenVox. El sistema operativo que utilizaremos sera Linux Red Hat Enterprise Linux 5.6 para arquitectura de 64 bits, el equipo donde desarrollaremos las pruebas es un HP Proliant ML150, una tarjeta Sango- ma A101 1-port T1/E1/J1 y conectores para los coaxiales para la conversi´ on a RJ45. Instalaremos el sistema y utilizaremos ´ unicamente paquetes que vienen junto con los discos de instalaci´ on, no usaremos yum para instalar ni actualizar paquetes principalmente para verificar los paquetes que son necesarios para compilar asterisk, dahdi y wanpipe (puedes utilizar CentOS por aquello de la licencia de RedHat). No cubriremos la instalaci´ on de Red Hat hay demasiada informaci´ on en la red para consultar solo hacemos menci´ on que se instala sin entorno gr´ afico y dem´ as aplicaciones no necesarias para un servi- dor de las caracter´ ısticas mencionadas. Los paquetes los tomaremos y los instalaremos usando la imagen ISO de RHEL mont´ andolo en un directorio para instalarlos mediante RPM, ya que tenemos instalado todo el sistema operativo y conectado adecuadamente a una red con acceso a Internet procederemos a lo siguiente: Crearemos un directorio denominado IPBX dentro de /usr/src que sera nuestro directorio de in- stalaci´ on, dentro de el crearemos otro directorio denominado Disco donde montaremos la ISO de instalaci´ on de Red Hat, para acceder a los paquetes. [root@asterisksangoma ~]# mkdir /usr/src/IPBX [root@asterisksangoma ~]# cd /usr/src/IPBX/ [root@asterisksangoma IPBX]# mkdir Disco [root@asterisksangoma IPBX]# mount -t iso9660 -o loop rhel-server-5.6-x86_64-dvd.iso Disco/ [root@asterisksangoma IPBX]# cd Disco/Server/ Estos son los paquetes que tuve que instalar para la compilaci´ on de wanpipe, dahdi, asterisk y openr2, hay dependencias entre ellos por lo tanto es necesario instalarlos todos, con yum o createrepo es mas autom´ atico sin embargo no son muchos paquetes y de esta manera uno se da cuenta de los necesarios. [root@asterisksangoma Server]# rpm -ivh kernel-devel-2.6.18-238.el5.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh ncurses-devel-5.5-24.20060715.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh ncurses-5.5-24.20060715.x86_64.rpm * [root@asterisksangoma Server]# rpm -ivh kernel-headers-2.6.18-238.el5.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh glibc-headers-2.5-58.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh glibc-devel-2.5-58.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh gcc-4.1.2-50.el5.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh flex-2.5.4a-41.fc6.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh patch-2.5.4-31.el5.x86_64.rpm * [root@asterisksangoma Server]# rpm -ivh libtermcap-devel-2.0.8-46.1.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh bison-2.3-2.1.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh imake-1.0.2-3.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh autoconf-2.59-12.noarch.rpm [root@asterisksangoma Server]# rpm -ivh automake-1.9.6-2.3.el5.noarch.rpm [root@asterisksangoma Server]# rpm -ivh libtool-1.5.22-7.el5_4.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh libstdc++-devel-4.1.2-50.el5.x86_64.rpm [root@asterisksangoma Server]# rpm -ivh gcc-c++-4.1.2-50.el5.x86_64.rpm 1

Upload: gordon-freeman

Post on 03-Oct-2014

209 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Openr2 Asterisk Sangoma

Asterisk, Sangoma A101 y OpenR2

Mayo 2011

Gabriel Bozada <[email protected]>http://www.trantoriano.net

Instalaremos Asterisk, DAHDI, OpenR2 y WANPIPE para configurar un enlace telefonico E1 deTELMEX en Mexico, sera la tercera guıa rapida que hago cada una con distintas tarjetas, Digium yOpenVox.

El sistema operativo que utilizaremos sera Linux Red Hat Enterprise Linux 5.6 para arquitecturade 64 bits, el equipo donde desarrollaremos las pruebas es un HP Proliant ML150, una tarjeta Sango-ma A101 1-port T1/E1/J1 y conectores para los coaxiales para la conversion a RJ45. Instalaremos elsistema y utilizaremos unicamente paquetes que vienen junto con los discos de instalacion, no usaremosyum para instalar ni actualizar paquetes principalmente para verificar los paquetes que son necesariospara compilar asterisk, dahdi y wanpipe (puedes utilizar CentOS por aquello de la licencia de RedHat).

No cubriremos la instalacion de Red Hat hay demasiada informacion en la red para consultar solohacemos mencion que se instala sin entorno grafico y demas aplicaciones no necesarias para un servi-dor de las caracterısticas mencionadas. Los paquetes los tomaremos y los instalaremos usando la imagenISO de RHEL montandolo en un directorio para instalarlos mediante RPM, ya que tenemos instaladotodo el sistema operativo y conectado adecuadamente a una red con acceso a Internet procederemos alo siguiente:

Crearemos un directorio denominado IPBX dentro de /usr/src que sera nuestro directorio de in-stalacion, dentro de el crearemos otro directorio denominado Disco donde montaremos la ISO deinstalacion de Red Hat, para acceder a los paquetes.

[root@asterisksangoma ~]# mkdir /usr/src/IPBX

[root@asterisksangoma ~]# cd /usr/src/IPBX/

[root@asterisksangoma IPBX]# mkdir Disco

[root@asterisksangoma IPBX]# mount -t iso9660 -o loop rhel-server-5.6-x86_64-dvd.iso Disco/

[root@asterisksangoma IPBX]# cd Disco/Server/

Estos son los paquetes que tuve que instalar para la compilacion de wanpipe, dahdi, asterisk y openr2,hay dependencias entre ellos por lo tanto es necesario instalarlos todos, con yum o createrepo es masautomatico sin embargo no son muchos paquetes y de esta manera uno se da cuenta de los necesarios.

[root@asterisksangoma Server]# rpm -ivh kernel-devel-2.6.18-238.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh ncurses-devel-5.5-24.20060715.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh ncurses-5.5-24.20060715.x86_64.rpm *

[root@asterisksangoma Server]# rpm -ivh kernel-headers-2.6.18-238.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh glibc-headers-2.5-58.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh glibc-devel-2.5-58.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh gcc-4.1.2-50.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh flex-2.5.4a-41.fc6.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh patch-2.5.4-31.el5.x86_64.rpm *

[root@asterisksangoma Server]# rpm -ivh libtermcap-devel-2.0.8-46.1.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh bison-2.3-2.1.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh imake-1.0.2-3.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh autoconf-2.59-12.noarch.rpm

[root@asterisksangoma Server]# rpm -ivh automake-1.9.6-2.3.el5.noarch.rpm

[root@asterisksangoma Server]# rpm -ivh libtool-1.5.22-7.el5_4.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh libstdc++-devel-4.1.2-50.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh gcc-c++-4.1.2-50.el5.x86_64.rpm

1

Page 2: Openr2 Asterisk Sangoma

[root@asterisksangoma Server]# rpm -ivh slang-devel-2.0.6-4.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh newt-devel-0.52.2-15.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh zlib-devel-1.2.3-3.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh libxml2-devel-2.6.26-2.1.2.8.el5_5.1.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh e2fsprogs-devel-1.39-23.el5_5.1.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh keyutils-libs-devel-1.2-1.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh libsepol-devel-1.15.2-3.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh libselinux-devel-1.33.4-5.7.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh krb5-devel-1.6.1-55.el5.x86_64.rpm

[root@asterisksangoma Server]# rpm -ivh openssl-devel-0.9.8e-12.el5_5.7.x86_64.rpm

En el directorio de IPBX descargaremos las ultimas versiones de cada una de las aplicaciones que vamosa utilizar, para este caso usaremos Wanpipe 3.5.20, Asterisk 1.8.4, DAHDI linux 2.4.1.2, DAHDI tools2.4.1 y OpenR2 1.3.1.

[root@asterisksangoma IPBX]# wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.20.tgz[root@asterisksangoma IPBX]# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.4.1.2.tar.gz[root@asterisksangoma IPBX]# wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.4.1.tar.gz[root@asterisksangoma IPBX]# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.4.tar.gz[root@asterisksangoma IPBX]# wget http://openr2.googlecode.com/files/openr2-1.3.1.tar.gz

Antes que nada debemos conectar al equipo la tarjeta y verificar que se reconocida por Linux, medi-ante lspci verificamos que adecuadamente el sistema operativo la reconocio y nos muestra donde estaconectada fısicamente.

Figura 1: La tarjeta en cuestion

[root@asterisksangoma ~]# lspci | grep Net

07:00.0 Network controller: Sangoma Technologies Corp. A200/Remora FXO/FXS Analog AFT card

07:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5703X Gigabit Ethernet (rev 02)

2

Page 3: Openr2 Asterisk Sangoma

Figura 2: Puerto PCI del equipo

Procedemos con la instalacion de los modulos de DAHDI y posteriormente la instalacion de Wanpipeya que vamos a utilizar DAHDI especificamos al script de instalacion el parametro dahdi.

[root@asterisksangoma IPBX]# tar xfz dahdi-linux-2.4.1.2.tar.gz

[root@asterisksangoma IPBX]# cd dahdi-linux-2.4.1.2

[root@asterisksangoma dahdi-linux-2.4.1.2]# make

[root@asterisksangoma dahdi-linux-2.4.1.2]# make install

[root@asterisksangoma dahdi-linux-2.4.1.2]# cd ..

[root@asterisksangoma IPBX]# tar xfz wanpipe-3.5.20.tgz

[root@asterisksangoma IPBX]# cd wanpipe-3.5.20

Figura 3: CD de Wanpipe

3

Page 4: Openr2 Asterisk Sangoma

El script de instalacion verificara los componentes necesarios como son paquetes, librerıas del kernelutilizado y el directorio de DAHDI a utilizar.

[root@asterisksangoma wanpipe-3.5.20]# ./Setup dahdi

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

WANPIPE INSTALLATION FOR DAHDI

You are about to install WANPIPE TDM Voice drivers

for Asterisk/Dahdi framework.

You will be prompted for path to DAHDI source.

Wanpipe drivers will compile into dahdi WITHOUT any

dahdi patching or need to recompile dahdi modules.

You must have Linux Kernel Headers along with

full development tools (i.e. GNU C compiler and utilities)

installed in order to be able to install this product.

If you have previoulsy installed WANPIPE, this release

will overrite/upgrade full release without the need to

uninstall first!

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.

----------------------------------------------------------

Fixing file permissions...

Verifying files and fixing permissions ...Done

Checking for C developement tools ...(gcc) OK

Checking for C++ developement tools ...OK

Checking for Make utility ...OK

Checking for ncurses library ... OK

Checking for Perl developement tools ...OK

Checking for AWK ...OK

Checking for FLEX ...OK

Checking for Patch ...OK

Checking for libtermcap-devel...OK

Checking for bison...OK

Checking for libtool...OK

4

Page 5: Openr2 Asterisk Sangoma

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

Installing WANPIPE Device Drivers: Linux KERNEL

To integrate WANPIPE Multi-Protocol Voice & WAN Router

modules into the Linux kernel, the kernel has to be

updated with latest wanpipe sources. Install will only

modify existing wanpipe source that is already in the

Kernel.

IMPORTANT:

It is always recommended to say YES to all options

prompted during the install!

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

Please specify absolute path name of your linux headers/source directory

Press Enter for Default: /lib/modules/2.6.18-238.el5/build

#>Setting linux directory to /lib/modules/2.6.18-238.el5/build

Upgrading WANPIPE kernel documentation ...Done.

Installing WANPIPE include headers ...Done.

WANPIPE device drivers upgraded successfully!

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

WANPIPE KERNEL DRIVER COMPILATION

The next step in WANPIPE installation involves compiling

WANPIPE kernel modules.

This script will compile and install WANPIPE modules

into the currently running linux kernel.

For greater customization you will be prompted to

select which Protocol/Drivers you would like to

5

Page 6: Openr2 Asterisk Sangoma

build into the WANPIPE kernel modules.

Wanpipe for Asterisk/Dahdi/Zaptel

Default for Asterisk/Dahdi/Zaptel

Wanpipe for Wan Routing/API

Default for Wan/IP Routing and Data API

Wanpipe for Asterisk SMG/SS7

Default for Asterisk SS7

Wanpipe for TDM API

Default for FreeSwitch and Voice API

Custom Compilation:

------------------

Customise WANPIPE driver compilation to add only the

protocols that you need. This way one can reduce

the size of the WANPIPE kernel drivers.

Refer to http://wiki.sangoma.com for more info

----------------------------------------------------------

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

6

Page 7: Openr2 Asterisk Sangoma

Custom voice development

11. Custom Compilation Mode

Specify protocols to be added into the WANPIPE

kernel drivers.

Please select (1-11) [Default: 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

Enabling the TDM Voice Asterisk Support

Dahdi HW HDLC Support Detected: Enabling DCHAN Feature

Native Dahdi HW HDLC Support Detected - No patch required

Dahdi source unmodified

Checking for UDEV Zaptel compatibility... Dahdi installed, no need to add UDEV rules

Enabling the AFT TE1 Support

Checking for SMP support ...Enabled.

Checking current processor type ...x86_64

Wan Update Flags: -DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE

--------------------------------------------------

CFLAGS: gcc -Wp,-MD,.wanpipe.o.d -nostdinc -iwithprefix include -D__LINUX__ -Dlinux -D__KERNEL__ -I/usr/include/wanpipe -I/lib/modules/2.6.18-238.el5/build/include -DMODULE -DAF_WANPIPE_2612_FORCE_UPDATE -DWANPIPE_MOD_266_FORCE_UPDATE -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -fno-delete-null-pointer-checks -fwrapv -Os -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D__KERNEL__ -Iinclude -include include/linux/autoconf.h

--------------------------------------------------

Checking for REGPARM kernel option ...Disabled.

Compiling General WANPIPE Driver for 2.6.X Kernel .....Done.

WAN HWEC module enabled and compiled!

Linking Wanpipe Driver and protocols ...Done.

Updating Kernel Modules ...Done.

Compilation Successful.

----------------------------------------------------------

7

Page 8: Openr2 Asterisk Sangoma

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

WANPIPE META CONFIGURATION

There are two configuration files associated with WANPIPE.

1) /usr/src/IPBX/wanpipe-3.5.20/wanrouter.rc:

- defines locations of important files such as lock

and configuration files as well as start/stop

order of multiple WANPIPE devices.

2) /usr/src/IPBX/wanpipe-3.5.20/wanpipe1.conf:

- main configuration file for each WANPIPE device.

- defines interfaces, hardware and protocol information.

- this file can be created using the ’wancfg’ GUI

utility or manually based on sample files located

in /etc/wanpipe/samples.

Please read the WanpipeInstallation.(pdf/txt) manual for further

information.

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

WANPIPE UTILITIES SETUP

WANPIPE utilities are used to:

1) create configuration files: for Zaptel and Asterisk

/usr/sbin/wancfg_zaptel #Zaptel and Asterisk

/usr/sbin/wancfg_dahdi #Dahdi and Asterisk

/usr/sbin/wancfg_smg #BRI/SS7, Zaptel and Asterisk

/usr/sbin/wancfg_tdmapi #TDM API

2) create WANPIPE WAN/IP configuration files.

(/usr/sbin/wancfg)

3) start,stop,restart individual/all devices and interfaces.

(/usr/sbin/wanrouter)

4) debug line, protocol and driver problems.

(/usr/sbin/wanpipemon)

5) aid in WANPIPE API development

(/etc/wanpipe/api)

Refer to the WanpipeInstallation.(pdf/txt) for more information.

Compiling WANPIPE Utilities ...Done.

Compiling WANPIPE WanCfg Utility ...Done.

Compiling WANPIPE LibSangoma API library ...Done.

8

Page 9: Openr2 Asterisk Sangoma

Compiling WANPIPE LibStelephony API library ...Done.

Compiling WANPIPE API Development Utilities ...Done.

Compiling WANPIPE HWEC Utilities ...Done.

WANPIPE Environment Setup Complete !!!

Installing WANPIPE Files ... !

Installing WANPIPE Utilities in /usr/sbin

Installing wanrouter.rc in /etc/wanpipe

Installing wanpipe libraries in /etc/wanpipe

Installing firmware in /etc/wanpipe/firmware

Installing documentation in /usr/share/doc/wanpipe

Installing sample api code in /etc/wanpipe/api

Installing AFT Firmware update utility in /etc/wanpipe/util

Installing driver headers in /etc/wanpipe/api/include/linux

Installing Hardware Echo Cancel Utilites

----------------------------------------------------------

WANPIPE v3.5.20 Installation Script

Copyright (c) 1995-2010, Sangoma Technologies Inc.

----------------------------------------------------------

WANPIPE INSTALLATON: COMPLETE

WANPIPE installation is now complete. WANPIPE kernel drivers

and configuration/debug utilities have been compiled and installed.

1) Proceed to configure the WANPIPE drivers:

Asterisk/Zaptel : /usr/sbin/wancfg_zaptel

Asterisk/Dahdi : /usr/sbin/wancfg_dahdi

TDM API : /usr/sbin/wancfg_tdmapi

SMG SS7/BRI/PRI : /usr/sbin/wancfg_smg

WAN Routing/API : /usr/sbin/wancfg

2) Use the /usr/sbin/wanrouter startup script to start and stop

the router. (eg: wanrouter start)

3) To uninstall WANPIPE package run ./Setup remove

Please read http://wiki.sangoma.com for further instructions.

Wanpipe / Zaptel Configuration

==============================

wancfg_zaptel configurator can create all wanpipe config files

for ZAPTEL including /etc/zaptel.conf file.

Optionally: the configurator can also create Asterisk zapata.conf

-----------------------------------------------------

Would you like to configure wanpipe devices for DAHDI? (y/n) n

Wanpipe Installation Complete

-----------------------------

Please proceed to configure wanpipe user /usr/sbin/wancfg_dahdi

9

Page 10: Openr2 Asterisk Sangoma

Hasta aquı termina la instalacion, le dimos la opcion de que no configurara de momento los dispositivosesto lo haremos despues con otro script del programa instalado aparte de que al final editaremosmanualmente nuestro archivo de configuracion. Con el comando wanrouter recien instalado verificamosque nuestra tarjeta sea reconocida efectivamente por wanpipe.

[root@asterisksangoma wanpipe-3.5.20]# wanrouter hwprobe

-------------------------------

| Wanpipe Hardware Probe Info |

-------------------------------

1 . AFT-A101-SH : SLOT=0 : BUS=7 : IRQ=7 : CPU=A : PORT=1 : HWEC=32 : V=37

Card Cnt: A101-2=1

Vemos que satisfactoriamente esta reconocida por la aplicacion, aquı en este punto especial introduzcoel siguiente error que se presento en diversos intentos de instalacion con otros kernel o sin la tarjetaE1 en el puerto PCI del equipo en cuestion.

FATAL: Error inserting wanpipe (/lib/modules/2.6.18-238.el5/kernel/drivers/net/wan/wanpipe.ko):Unknown symbol in module, or unknown parameter (see dmesg) Would you like to generate /etc/asterisk/zapata.conf

Iniciamos el script de configuracion tomando los pasos de un white paper denominado “RunningMFC/R2 with Sangoma Wanpipe R© using OpenR2 (libopenr2)“, para generar el archivo de configu-racion de wanpipe.

[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

---------------------------------------------

Configuring T1/E1 cards [A101/A102/A104/A108]

---------------------------------------------

A101 detected on slot:0 bus:7

-----------------------------------------------------------

Configuring port 1 on A101 slot:0 bus:7.

-----------------------------------------------------------

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

10

Page 11: Openr2 Asterisk Sangoma

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

Select signalling type for AFT-A101 on port 1 [slot:0 bus:7 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]:5

Would you like to enable hardware DTMF detection?

1. YES

2. NO

[1-2, ENTER=’YES’]:1

Would you like to enable hardware fax detection?

1. YES

2. NO

[1-2, ENTER=’NO’]: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

Port 1 on AFT-A101 configuration complete...

Press any key to continue:

T1/E1 card configuration complete.

Press any key to continue:

------------------------------------

Configuring analog cards [A200/A400/B600/B700/B800]

11

Page 12: Openr2 Asterisk Sangoma

------------------------------------

------------------------------------

Configuring USB devices [U100]

------------------------------------

###################################################################

# SUMMARY #

###################################################################

1 T1/E1 port(s) detected, 1 configured

0 ISDN BRI port(s) detected, 0 configured

0 analog card(s) detected, 0 configured

0 usb device(s) detected, 0 configured

Configurator will create the following files:

1. Wanpipe config files in /etc/wanpipe

2. Dahdi config file /etc/dahdi/system.conf

3. Chan-Dahdi config file /etc/asterisk/chan_dahdi.conf

Your original configuration files will be saved to:

1. /etc/dahdi/system.conf.bak

2. /etc/asterisk/chan_dahdi.conf.bak

Your configuration has been saved in /etc/wanpipe/debug-2011-05-15.tgz.

When requesting support, email this file to [email protected]

###################################################################

Configuration Complete! Please select following:

1. YES - Continue

2. NO - Exit

[1-2]:

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]:5

Removing old configuration files...

Copying new Wanpipe configuration files...

Copying new Dahdi configuration file (/etc/dahdi/system.conf)...

cp: cannot create regular file ‘/etc/dahdi/system.conf’: No such file or directory

Error executing command:

cp -f /etc/wanpipe/wancfg_zaptel/tmp_cfg/zaptel.conf /etc/dahdi/system.conf

12

Page 13: Openr2 Asterisk Sangoma

Would you like to continue?

1. No - exit

2. YES

[1-2, ENTER=’No’]:2

Copying new Chan-Dahdi configuration files (/etc/asterisk/chan_dahdi.conf)...

cp: cannot create regular file ‘/etc/asterisk/chan_dahdi.conf’: No such file or directory

Error executing command:

cp -f /etc/wanpipe/wancfg_zaptel/tmp_cfg/zapata.conf /etc/asterisk/chan_dahdi.conf

Would you like to continue?

1. No - exit

2. YES

[1-2, ENTER=’No’]:2

Saving files only

Current boot level is 3

Wanrouter boot scripts configuration...

Removing existing wanrouter boot scripts...OK

Would you like wanrouter to start on system boot?

1. YES

2. NO

[1-2]:1

Verifying Dahdi boot scripts...

Verifying Dahdi boot scripts...Not installed

Verifying Dahdi shutdown scripts...Not installed

Enabling wanrouter boot scripts ...(level:8)

Enabling wanrouter shutdown scripts ...(level:91)

Remvoing old smg_ctrl boot.....OK

Remvoing old smg_ctrl_safe boot.....OK

Posteriormente realizaremos unos cambios en el archivo de configuracion, vamos a verificar que wan-router nos muestre el dispositivo.

[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:

13

Page 14: Openr2 Asterisk Sangoma

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 las herramientas de DAHDI para usar dahdi tool.

[root@asterisksangoma wanpipe-3.5.20]# cd ..

[root@asterisksangoma IPBX]# tar xfz dahdi-tools-2.4.1.tar.gz

[root@asterisksangoma IPBX]# cd dahdi-tools-2.4.1

[root@asterisksangoma dahdi-tools-2.4.1]# ./configure

[root@asterisksangoma dahdi-tools-2.4.1]# make

[root@asterisksangoma dahdi-tools-2.4.1]# make install

[root@asterisksangoma dahdi-tools-2.4.1]# make config

[root@asterisksangoma dahdi-tools-2.4.1]# cd ..

Compilamos e instalamos OpenR2 segun las indicaciones del manual colocado en la pagina del autor.

[root@asterisksangoma IPBX]# tar xvfz openr2-1.3.1.tar.gz

[root@asterisksangoma IPBX]# cd openr2-1.3.1

[root@asterisksangoma openr2-1.3.1]# ./configure --prefix=/usr

[root@asterisksangoma openr2-1.3.1]# make

[root@asterisksangoma openr2-1.3.1]# make install

Por ultimo compilamos e instalamos Asterisk.

[root@asterisksangoma IPBX]# tar xfz asterisk-1.8.4.tar.gz

[root@asterisksangoma IPBX]# cd asterisk-1.8.4

[root@asterisksangoma IPBX]# ./configure

[root@asterisksangoma IPBX]# make

[root@asterisksangoma IPBX]# make install

[root@asterisksangoma IPBX]# make samples

Verificamos que el soporte de OpenR2 este correctamente instalado en Asterisk.

[root@asterisksangoma asterisk-1.8.4]# ldd channels/chan_dahdi.so | grep openr2

libopenr2.so.3 => /usr/lib64/libopenr2.so.3 (0x00002ab1f4dbe000)

Configuraremos DAHDI con los siguientes parametros especıficos para el E1 de TELMEX, son treintacanales posibles de comunicacion con el canal 16 para senalizacion.

[root@asterisksangoma IPBX]# vi /etc/dahdi/system.conf

span=1,1,0,cas,hdb3

cas=1-15:1101

dchan=16

cas=17-31:1101

loadzone=us

defaultzone=us

Cargamos la configuracion.

14

Page 15: Openr2 Asterisk Sangoma

[root@asterisksangoma IPBX]# dahdi_cfg -vv

DAHDI Tools Version - 2.4.1

DAHDI Version: 2.4.1.2

Echo Canceller(s):

Configuration

======================

SPAN 1: CAS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: CAS / User (Default) (Echo Canceler: none) (Slaves: 01)

Channel 02: CAS / User (Default) (Echo Canceler: none) (Slaves: 02)

Channel 03: CAS / User (Default) (Echo Canceler: none) (Slaves: 03)

Channel 04: CAS / User (Default) (Echo Canceler: none) (Slaves: 04)

Channel 05: CAS / User (Default) (Echo Canceler: none) (Slaves: 05)

Channel 06: CAS / User (Default) (Echo Canceler: none) (Slaves: 06)

Channel 07: CAS / User (Default) (Echo Canceler: none) (Slaves: 07)

Channel 08: CAS / User (Default) (Echo Canceler: none) (Slaves: 08)

Channel 09: CAS / User (Default) (Echo Canceler: none) (Slaves: 09)

Channel 10: CAS / User (Default) (Echo Canceler: none) (Slaves: 10)

Channel 11: CAS / User (Default) (Echo Canceler: none) (Slaves: 11)

Channel 12: CAS / User (Default) (Echo Canceler: none) (Slaves: 12)

Channel 13: CAS / User (Default) (Echo Canceler: none) (Slaves: 13)

Channel 14: CAS / User (Default) (Echo Canceler: none) (Slaves: 14)

Channel 15: CAS / User (Default) (Echo Canceler: none) (Slaves: 15)

Channel 16: D-channel (Default) (Echo Canceler: none) (Slaves: 16)

Channel 17: CAS / User (Default) (Echo Canceler: none) (Slaves: 17)

Channel 18: CAS / User (Default) (Echo Canceler: none) (Slaves: 18)

Channel 19: CAS / User (Default) (Echo Canceler: none) (Slaves: 19)

Channel 20: CAS / User (Default) (Echo Canceler: none) (Slaves: 20)

Channel 21: CAS / User (Default) (Echo Canceler: none) (Slaves: 21)

Channel 22: CAS / User (Default) (Echo Canceler: none) (Slaves: 22)

Channel 23: CAS / User (Default) (Echo Canceler: none) (Slaves: 23)

Channel 24: CAS / User (Default) (Echo Canceler: none) (Slaves: 24)

Channel 25: CAS / User (Default) (Echo Canceler: none) (Slaves: 25)

Channel 26: CAS / User (Default) (Echo Canceler: none) (Slaves: 26)

Channel 27: CAS / User (Default) (Echo Canceler: none) (Slaves: 27)

Channel 28: CAS / User (Default) (Echo Canceler: none) (Slaves: 28)

Channel 29: CAS / User (Default) (Echo Canceler: none) (Slaves: 29)

Channel 30: CAS / User (Default) (Echo Canceler: none) (Slaves: 30)

Channel 31: CAS / User (Default) (Echo Canceler: none) (Slaves: 31)

31 channels to configure.

Setting echocan for channel 1 to none

Setting echocan for channel 2 to none

Setting echocan for channel 3 to none

Setting echocan for channel 4 to none

Setting echocan for channel 5 to none

Setting echocan for channel 6 to none

Setting echocan for channel 7 to none

Setting echocan for channel 8 to none

Setting echocan for channel 9 to none

Setting echocan for channel 10 to none

15

Page 16: Openr2 Asterisk Sangoma

Setting echocan for channel 11 to none

Setting echocan for channel 12 to none

Setting echocan for channel 13 to none

Setting echocan for channel 14 to none

Setting echocan for channel 15 to none

Setting echocan for channel 16 to none

Setting echocan for channel 17 to none

Setting echocan for channel 18 to none

Setting echocan for channel 19 to none

Setting echocan for channel 20 to none

Setting echocan for channel 21 to none

Setting echocan for channel 22 to none

Setting echocan for channel 23 to none

Setting echocan for channel 24 to none

Setting echocan for channel 25 to none

Setting echocan for channel 26 to none

Setting echocan for channel 27 to none

Setting echocan for channel 28 to none

Setting echocan for channel 29 to none

Setting echocan for channel 30 to none

Setting echocan for channel 31 to none

Configuramos los parametros con respecto a MFCR2, los DNIS, el contexto y los canales a utilizar, eneste caso de los canales uno al veintiuno (el 16 se usa senalizacion) debido a que mi E1 tiene veintelineas disponibles.

[root@asterisksangoma ~]# cat /etc/asterisk/chan_dahdi.conf

[channels]

signalling=mfcr2

mfcr2_variant=mx

mfcr2_get_ani_first=no

mfcr2_max_ani=10

mfcr2_max_dnis=4

mfcr2_category=national_subscriber

mfcr2_mfback_timeout=-1

mfcr2_metering_pulse_timeout=-1

; this is for debugging purposes

mfcr2_logdir=log

mfcr2_logging=all

; end debugging configuration

context=from-pstn

group=1

restrictcid=yes

hidecallerid=yes

channel => 1-15

channel => 17-21

Con esto ya tenemos configurada la parte de Asterisk y DAHDI para solo recibir la senal del E1, vamosa terminar de configurar Wanpipe. Conectar el E1 no basta para que nuestra tarjeta inmediatamenteempiece a trabajar, en dado caso wanpipemon nos ayudara a identificar las posibles alarmas existentespara lograr poner en verde el led indicador del estado de nuestra tarjeta.Aquı cito la siguiente pagina: http://wiki.sangoma.com/wanpipemon-T1-E1-line-alarms-0 de lawiki de sangoma donde nos muestran la descripcion de cada una de estas alarmas, verificamos comowanpipemon muestra las alarmas cuando no tenemos conexion alguna en la tarjeta, nota la alarma deopen circuit, loss of framing y loss of frame signal.

[root@asterisksangoma IPBX]# wanpipemon -i w1g1 -c Ta

16

Page 17: Openr2 Asterisk Sangoma

***** w1g1: E1 Rx Alarms (Framer) *****

ALOS: OFF | LOS: ON

RED: ON | AIS: OFF

LOF: ON | RAI: OFF

***** w1g1: E1 Rx Alarms (LIU) *****

Short Circuit: OFF

Open Circuit: ON

Loss of Signal: ON

***** w1g1: E1 Tx Alarms *****

AIS: OFF | YEL: ON

***** w1g1: E1 Performance Monitoring Counters *****

Line Code Violation : 0

Far End Block Errors : 0

CRC4 Errors : 0

FAS Errors : 0

Rx Level : < -44db

Aquı un ejemplo de la tarjeta conectada con un loop en los coaxiales, esto con el fin de compararciertas alarmas que van desde una mala senal enviada por el otro lado de nuestro enlace ası comocables invertidos en la conexion, la alarma es la de loss of framing.

Figura 4: Tarjeta conectada en loop

17

Page 18: Openr2 Asterisk Sangoma

[root@asterisksangoma IPBX]# wanpipemon -i w1g1 -c Ta

***** w1g1: E1 Rx Alarms (Framer) *****

ALOS: OFF | LOS: OFF

RED: ON | AIS: OFF

LOF: ON | RAI: OFF

***** w1g1: E1 Rx Alarms (LIU) *****

Short Circuit: OFF

Open Circuit: OFF

Loss of Signal: OFF

***** w1g1: E1 Tx Alarms *****

AIS: OFF | YEL: ON

***** w1g1: E1 Performance Monitoring Counters *****

Line Code Violation : 725

Far End Block Errors : 0

CRC4 Errors : 0

FAS Errors : 0

Rx Level : > -2.5db

En los logs del sistema se pueden presentar mensajes similares a los siguientes haciendo referencia alreloj, en mi caso fue por que el Rx y Tx de los coaxiales estaban invertidos en el balun, sin embargoen la FAQ de Sangoma hay mas causas posibles, tambien nota que aparecen otras alarmas diferentesen especial la de short circuit que nos indica que los cables estan cruzados, y la de remote alarmindication.

[root@asterisksangoma ~]# wanpipemon -i w1g1 -c Ta

***** w1g1: E1 Rx Alarms (Framer) *****

ALOS: OFF | LOS: OFF

RED: ON | AIS: OFF

LOF: ON | RAI: ON

***** w1g1: E1 Rx Alarms (LIU) *****

Short Circuit: ON

Open Circuit: OFF

Loss of Signal: OFF

***** w1g1: E1 Tx Alarms *****

AIS: OFF | YEL: ON

***** w1g1: E1 Performance Monitoring Counters *****

Line Code Violation : 826634

18

Page 19: Openr2 Asterisk Sangoma

Far End Block Errors : 0

CRC4 Errors : 0

FAS Errors : 2166

Rx Level : -40db to -44db

[root@asterisksangoma ~]# tail -f /var/log/messages

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:53 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:53 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:54 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:54 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

May 19 20:48:54 asterisksangoma kernel: wanec1: The CT_C8_A clock behavior does not conform to the H.100 spec!

May 19 20:48:54 asterisksangoma kernel: wanec1: The H100 slave has lost its framing on the bus!

En los casos anteriores el comando dahdi tool nos mostrara la alarma en la tarjeta y mientras existaAsterisk no podra usarla.

Figura 5: dahdi tool

19

Page 20: Openr2 Asterisk Sangoma

Figura 6: dahdi tool

La alarma RED se quitara hasta que logremos configurar adecuadamente la tarjeta y nos deje demostrar las demas alarmas, anteriormente configuramos con el script, necesitamos cambiar en el archivowanpipe1.conf dentro del directorio /etc/wanpipe, el tipo de framing a NCRC4 en vez de CRC4 yconfirmar que la configuracion del reloj se encuentre en modo normal.

FE_FRAME = NCRC4

TE_CLOCK = NORMAL

Conectamos el E1 a la tarjeta y comprobamos las alarmas en ella.

[root@asterisksangoma ~]# wanpipemon -i w1g1 -c Ta

***** w1g1: E1 Rx Alarms (Framer) *****

ALOS: OFF | LOS: OFF

RED: OFF | AIS: OFF

LOF: OFF | RAI: OFF

***** w1g1: E1 Rx Alarms (LIU) *****

Short Circuit: OFF

Open Circuit: OFF

Loss of Signal: OFF

***** w1g1: E1 Tx Alarms *****

AIS: OFF | YEL: OFF

***** w1g1: E1 Performance Monitoring Counters *****

Line Code Violation : 2620

Far End Block Errors : 0

20

Page 21: Openr2 Asterisk Sangoma

CRC4 Errors : 0

FAS Errors : 1507

Rx Level : > -2.5db

Figura 7: E1 conectado

Figura 8: LED en verde

21

Page 22: Openr2 Asterisk Sangoma

Satisfactoriamente no hay ninguna alarma, nuestra tarjeta se pone en verde y esta lista para recibirllamadas, confirmamos con dahdi tool.

Figura 9: dahdi tool

Entramos a la consola de Asterisk y verificamos que los canales esten listos.

asterisksangoma*CLI> mfcr2 show channels

Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS Rx CAS

1 MX 10 4 No No IDLE IDLE

2 MX 10 4 No No IDLE IDLE

3 MX 10 4 No No IDLE IDLE

4 MX 10 4 No No IDLE IDLE

5 MX 10 4 No No IDLE IDLE

6 MX 10 4 No No IDLE IDLE

7 MX 10 4 No No IDLE IDLE

8 MX 10 4 No No IDLE IDLE

9 MX 10 4 No No IDLE IDLE

10 MX 10 4 No No IDLE IDLE

11 MX 10 4 No No IDLE IDLE

12 MX 10 4 No No IDLE IDLE

13 MX 10 4 No No IDLE IDLE

14 MX 10 4 No No IDLE IDLE

15 MX 10 4 No No IDLE IDLE

17 MX 10 4 No No IDLE IDLE

18 MX 10 4 No No IDLE IDLE

19 MX 10 4 No No IDLE IDLE

20 MX 10 4 No No IDLE IDLE

21 MX 10 4 No No IDLE IDLE

asterisksangoma*CLI>

DAHDI tambien se muestra configurado adecuadamente.

asterisksangoma*CLI> dahdi show channels

Chan Extension Context Language MOH Interpret Blocked State

pseudo default default In Service

22

Page 23: Openr2 Asterisk Sangoma

1 from-pstn default In Service

2 from-pstn default In Service

3 from-pstn default In Service

4 from-pstn default In Service

5 from-pstn default In Service

6 from-pstn default In Service

7 from-pstn default In Service

8 from-pstn default In Service

9 from-pstn default In Service

10 from-pstn default In Service

11 from-pstn default In Service

12 from-pstn default In Service

13 from-pstn default In Service

14 from-pstn default In Service

15 from-pstn default In Service

17 from-pstn default In Service

18 from-pstn default In Service

19 from-pstn default In Service

20 from-pstn default In Service

21 from-pstn default In Service

asterisksangoma*CLI>

Si tenemos la tarjeta con alarma los canales se nos mostraran de la siguiente manera:

asterisksangoma*CLI> dahdi show channels

Chan Extension Context Language MOH Interpret Blocked State

pseudo default default In Service

1 from-pstn default R In Service

2 from-pstn default R In Service

3 from-pstn default R In Service

4 from-pstn default R In Service

5 from-pstn default R In Service

6 from-pstn default R In Service

7 from-pstn default R In Service

8 from-pstn default R In Service

9 from-pstn default R In Service

10 from-pstn default R In Service

11 from-pstn default R In Service

12 from-pstn default R In Service

13 from-pstn default R In Service

14 from-pstn default R In Service

15 from-pstn default R In Service

17 from-pstn default R In Service

18 from-pstn default R In Service

19 from-pstn default R In Service

20 from-pstn default R In Service

21 from-pstn default R In Service

asterisksangoma*CLI> mfcr2 show channels

Chan Variant Max ANI Max DNIS ANI First Immediate Accept Tx CAS Rx CAS

1 MX 10 4 No No IDLE BLOCK

2 MX 10 4 No No IDLE BLOCK

3 MX 10 4 No No IDLE BLOCK

4 MX 10 4 No No IDLE BLOCK

5 MX 10 4 No No IDLE BLOCK

6 MX 10 4 No No IDLE BLOCK

7 MX 10 4 No No IDLE BLOCK

23

Page 24: Openr2 Asterisk Sangoma

8 MX 10 4 No No IDLE BLOCK

9 MX 10 4 No No IDLE BLOCK

10 MX 10 4 No No IDLE BLOCK

11 MX 10 4 No No IDLE BLOCK

12 MX 10 4 No No IDLE BLOCK

13 MX 10 4 No No IDLE BLOCK

14 MX 10 4 No No IDLE BLOCK

15 MX 10 4 No No IDLE BLOCK

17 MX 10 4 No No IDLE BLOCK

18 MX 10 4 No No IDLE BLOCK

19 MX 10 4 No No IDLE BLOCK

20 MX 10 4 No No IDLE BLOCK

21 MX 10 4 No No IDLE BLOCK

asterisksangoma*CLI>

Configuramos rapidamente una extension SIP 1000 con el contexto from-pstn para que pueda recibirlas llamadas, marcamos y vemos como la llamada entra con el primer DNI y se dirige a la extension1000.

Figura 10: Llamada entrante

asterisksangoma*CLI>

New MFC/R2 call detected on chan 11.

MFC/R2 call offered on chan 11. ANI = , DNIS = 5900, Category = National Priority Subscriber

MFC/R2 call has been accepted on backward channel 11

-- Executing [5900@from-pstn:1] Dial("DAHDI/11-1", "SIP/1000") in new stack

== Using SIP RTP CoS mark 5

-- Called 1000

-- SIP/1000-00000001 is ringing

-- SIP/1000-00000001 answered DAHDI/11-1

== Spawn extension (from-pstn, 5900, 1) exited non-zero on ’DAHDI/11-1’

-- Hungup ’DAHDI/11-1’

MFC/R2 call end on channel 11

Sobre esa misma extension realizamos una llamada de salida.

24

Page 25: Openr2 Asterisk Sangoma

asterisksangoma*CLI>

== Using SIP RTP CoS mark 5

-- Executing [46028079@pruebas:1] Dial("SIP/1000-00000007", "DAHDI/g1/46028079") in new stack

-- Called g1/46028079

MFC/R2 call has been accepted on forward channel 1

-- DAHDI/1-1 is ringing

-- DAHDI/1-1 is making progress passing it to SIP/1000-00000007

MFC/R2 call has been answered on channel 1

-- DAHDI/1-1 answered SIP/1000-00000007

Chan 1 - Far end disconnected. Reason: Normal Clearing

MFC/R2 call disconnected on channel 1

-- Hungup ’DAHDI/1-1’

== Spawn extension (pruebas, 46028079, 1) exited non-zero on ’SIP/1000-00000007’

Figura 11: Llamada saliente

El telefono es un MITEL 5312, disenados especıficamente para el protocolo MINET sin embargo tienesoporte para SIP, solo es cuestion de que inicie con el protocolo, y lo podremos registrar con cualquierproxy SIP mediante su pagina web de configuracion.

Utilizamos dos tipos de conectores de coaxial a RJ45 que se muestran a continuacion:

25

Page 26: Openr2 Asterisk Sangoma

Figura 12: Conector MITEL

Este conector lo utiliza el conmutador MITEL de donde tome el E1.

Figura 13: Conector K162

Y aquı el conector de la marca AC and E, 408809069 K162.

De momento es todo, configuraciones mas especificas quedan fuera de esta guıa, quedan puntos pen-dientes como instalar una tarjeta Digium junto con la Sangoma, la instalacion de Wanpipe en Debianque esperamos abordar en otro momento.

26

Page 27: Openr2 Asterisk Sangoma

Saludos, dejo las paginas de donde se tomo la informacion.

Referencias:

http://code.google.com/p/openr2/downloads/list

http://wiki.sangoma.com/wanpipemon-T1-E1-line-alarms-0

http://www.fonality.com/trixbox/forums/vendor-forums-certified/sangoma/sangoma-a101d-alarm-redon-lofon

http://wiki.sangoma.com/konrads-cheat-sheet

http://wiki.sangoma.com/mfcr2

http://wiki.sangoma.com/wanpipe-linux-asterisk-debugging#pri_span_debugging

http://wiki.sangoma.com/wanpipe-linux-asterisk-appendix

http://libopenr2.org

http://code.google.com/p/openr2/downloads/list

http://edocs.mitel.com/UG/EN/5312-5324_SIP7.2_UG_GA.pdf

http://sangoma.com/assets/docs/misc/MFCR2_and_Sangoma_English.pdf

http://demerzel.wordpress.com/2008/10/23/asterisk-y-e1-experiencias/

http://demerzel.org/?p=13

27