Para los que no lo sepan Issabel PBX es el proyecto que continuo con el legado del extinto proyecto elastix, muchos colaboradores del anterior proyecto se sumaron en una nueva aventura y dieron forma a Issabel una solución PBX al mero estilo de Elastix: fácil de manejar e intuitiva en su configuración.
En este manual explicare como instalar chan_dongle para tener un Gateway GSM operativo al 100% en conjunto con Isabbel PBX, no entrare en tema en como instalar Issabel puesto que existen infinidad de manuales e internet para poder instalar Issabel, por lo cual, partiré que ya tienen Issabel PBX funcionando y con una sesión de root lista.
NOTA: A día de hoy Issabel PBX se encuentra en su version 47, que nos brinda la posibilidad de realizar la instalación con diversas versiones de asterisk, para este manual emplee la version 11 (como lo indica el título del manual).
issabel-pbx-4-chan_dongle
Configurando e instalando chan_dongle en Issabel 4
Para comenzar con la instalación deberemos instalar algunas dependencias:
yum install git
yum install git
yum install git
Después dentro del directorio de /root/ (por practicidad) procederemos a clonar el repositorio de chan_dongle:
[root@issabel asterisk-chan-dongle]# ./configure --with-astversion=11.25.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for strip... strip
checking for rm... rm
checking for library containing iconv... none required
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for strip... strip
checking for rm... rm
checking for library containing iconv... none required
[root@issabel asterisk-chan-dongle]# ./configure --with-astversion=11.25.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for strip... strip
checking for rm... rm
checking for library containing iconv... none required
En este instante, deberemos conectar nuestro modem y en “teoría” debería de funcionar pero resulta que nos arroja un error:
[dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:37:35] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:37:35] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
issabel*CLI>
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:37:50] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:37:50] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:38:05] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:38:05] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
[2020-01-3112:38:05] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
[dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:37:35] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:37:35] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
issabel*CLI>
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:37:50] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:37:50] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[2020-01-31 12:38:05] ERROR[11487]: chan_dongle.c:137 lock_create: open('/var/lock/LCK..ttyUSB2') failed: Permission denied
[2020-01-31 12:38:05] WARNING[11487]: chan_dongle.c:222 opentty: unable to open /dev/ttyUSB2: No such file or directory
Esto hace alusión a que el dispositivo /dev/ttyUSBX no puede ser accedido por asterisk, esto es un tema de permisos por lo que debemos de cambiarle permisos al dispositivo, esto lo logramos con:
Donde después volveremos a ingresar a asterisk y nos percataremos que ya está funcionando y operativo nuestro modem:
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
issabel*CLI> dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Free 27 0 0 weex E153 11.609.18.00.00 861435000361846 334030882534042 Unknown
issabel*CLI>
issabel*CLI>
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
issabel*CLI> dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready
issabel*CLI> dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Free 27 0 0 weex E153 11.609.18.00.00 861435000361846 334030882534042 Unknown
issabel*CLI>
issabel*CLI>
Configurar Isabel vía Web para llamar a travez de chan_dongle
Ahora una vez que está configurado y cargado el módulo de chan_dongle procedemos a acceder a la interface web de Issabel para poder ejecutar llamadas a través de nuestro nuevo gateway GSM.
Lo primero que haremos será generar una extensión, esto lo realizaremos (como en el viejo Elastix) dentro de:
No voy a explicar cómo crear una extensión dentro de Issabel/Elastix porque es algo bastante documentado en internet, pero solo mencionare que es fundamental tener presente el usuario/número de extensión y el password generado o el secret (como lo nombra Issabel).
extension-Issabel-PBX
Para validar que nuestra extensión configurada se registró de manera correcta en nuestro PBX veremos un mensaje como el siguiente en la consola:
Registered SIP '1337' at 172.16.151.1:59107
> Saved useragent "Z 5.3.5 rv2.9.26-mod" for peer 1337
[2020-01-31 15:19:51] NOTICE[9341]: chan_sip.c:23892 handle_response_peerpoke: Peer '1337' is now Reachable. (1ms / 2000ms)
Registered SIP '1337' at 172.16.151.1:59107
> Saved useragent "Z 5.3.5 rv2.9.26-mod" for peer 1337
[2020-01-3115:19:51] NOTICE[9341]: chan_sip.c:23892 handle_response_peerpoke: Peer '1337' is now Reachable. (1ms / 2000ms)
Registered SIP '1337' at 172.16.151.1:59107
> Saved useragent "Z 5.3.5 rv2.9.26-mod" for peer 1337
[2020-01-31 15:19:51] NOTICE[9341]: chan_sip.c:23892 handle_response_peerpoke: Peer '1337' is now Reachable. (1ms / 2000ms)
Una vez que tenemos registrada nuestra extensión generaremos una troncal, esto lo realizaremos en:
Donde los datos importantes serán el nombre de la troncal (para temas de identificación/control) y la “Cadena de marcación peronalizada”, que como vemos en la imagen es:
dongle/dongle0/$OUTNUM$
dongle/dongle0/$OUTNUM$
dongle/dongle0/$OUTNUM$
Esto es de suma importancia para que salgan las llamadas.
Después de realizado esto procederemos a generar una “Ruta Saliente” esto lo podremos efectuar desde: PBX > Configuración PBX > Básico > Rutas Salientes > Añadir ruta
ruta-de-salida-Issabel-GSM
Donde los datos más importantes serán: “Dial Patterns that will use this Route” que básicamente es la coincidencia en la marcación, en este caso emplee un “punto” que nos dice que todo lo que se marque saldrá por ahí, de igual forma, otro campo importante es “Trunk Sequence for Matched Routes” que es la ruta que empleara para sacar el tráfico, en la imagen aparece seleccionada la troncal chan_dongle porque es así como nombre la troncal personalizada en el paso anterior.
Una vez efectuados todos los pasos que se mencionaron anteriormente, en la consola de asterisk podremos observar la correcta salida de las llamadas cuando marcamos a un número cualquiera des nuestra extension: 5556581111 (una dependencia de gobierno aquí en MX).
-- Goto (macro-dialout-trunk,s,29)
-- Executing [s@macro-dialout-trunk:29] Set("SIP/1337-00000000", "the_num=5556581111") in new stack
-- Executing [s@macro-dialout-trunk:30] Dial("SIP/1337-00000000", "dongle/dongle0/5556581111,300,T") in new stack
-- Called dongle/dongle0/5556581111
-- Dongle/dongle0-0100000000 is making progress passing it to SIP/1337-00000000
> 0x7f0a1c03bfd0 -- Strict RTP switching source address to 172.16.151.1:8000
> 0x7f0a1c03bfd0 -- Strict RTP learning complete - Locking on source address 172.16.151.1:8000
-- Dongle/dongle0-0100000000 answered SIP/1337-00000000
-- Goto(macro-dialout-trunk,s,29)
-- Executing [s@macro-dialout-trunk:29]Set("SIP/1337-00000000", "the_num=5556581111") in new stack
-- Executing [s@macro-dialout-trunk:30]Dial("SIP/1337-00000000", "dongle/dongle0/5556581111,300,T") in new stack
-- Called dongle/dongle0/5556581111
-- Dongle/dongle0-0100000000 is making progress passing it to SIP/1337-00000000
> 0x7f0a1c03bfd0 -- Strict RTP switching source address to 172.16.151.1:8000
-- Goto (macro-dialout-trunk,s,29)
-- Executing [s@macro-dialout-trunk:29] Set("SIP/1337-00000000", "the_num=5556581111") in new stack
-- Executing [s@macro-dialout-trunk:30] Dial("SIP/1337-00000000", "dongle/dongle0/5556581111,300,T") in new stack
-- Called dongle/dongle0/5556581111
-- Dongle/dongle0-0100000000 is making progress passing it to SIP/1337-00000000
> 0x7f0a1c03bfd0 -- Strict RTP switching source address to 172.16.151.1:8000
> 0x7f0a1c03bfd0 -- Strict RTP learning complete - Locking on source address 172.16.151.1:8000
-- Dongle/dongle0-0100000000 answered SIP/1337-00000000
De esta forma ya tendríamos configurado chan_dongle e Issabel y se encontrarían listos para sacar cualquier cantidad de tráfico que deseemos. Para cualquier duda o comentario puedes escribirlo en la sección de comentarios y con gusto responderé. O en su caso en la sección de contacto si tu duda es muy específica.