interactuando con a2billing

13
Webinar integración A2billing en Elastix 11-03-2015 OBJETIVO Configurar Una extensión para que las llamadas a determinada ruta se facturen en a2billing, con la posibilidad que utilice saldo en forma prepagada. ESCENARIO PBX Versiones: Kernel Linux(x86_64)-2.6.18-348.1.1.el5 Elastix elastix-2.4.0-1 elastix-a2billing-1.9.4-5 elastix-pbx-2.4.0-1 FreePBX freePBX-2.8.1-16 Asterisk asterisk-1.8.20.0-0 asterisk-perl-0.10-2 asterisk-addons-1.8.20.0-0 1 Extensión 1 Troncal con salida a PSTN 1 MOD – MODIFICACION DE LA TABLA CC_SIP_BUDIES [root@localhost ~]# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 32 Server version: 5.0.95 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> En la consola de MYSQL corremos estas 3 instrucciones: ALTER TABLE `cc_sip_buddies` CHANGE `lastms` `lastms` INT( 11 ) NOT NULL; ALTER TABLE `cc_sip_buddies` CHANGE `canreinvite` `canreinvite` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'YES'; ALTER TABLE `cc_sip_buddies` CHANGE `setvar` `setvar` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; 2 MOD – CREACION DE ARCHIVOS FALTANTES Y ASIGNACION DE PERMISOS [root@localhost ~]# touch /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# touch /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# touch /etc/asterisk/additional_sip.conf [root@localhost ~]# echo \#include additional_a2billing_iax.conf >> /etc/asterisk/iax.conf [root@localhost ~]# echo \#include additional_a2billing_sip.conf >> /etc/asterisk/sip.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_sip.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_sip.conf

Upload: elastix

Post on 17-Jul-2015

339 views

Category:

Technology


10 download

TRANSCRIPT

Page 1: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

OBJETIVO Configurar Una extensión para que las llamadas a determinada ruta se facturen en a2billing, con la posibilidad que utilice saldo en forma prepagada. ESCENARIO PBX Versiones: Kernel Linux(x86_64)-2.6.18-348.1.1.el5 Elastix elastix-2.4.0-1 elastix-a2billing-1.9.4-5 elastix-pbx-2.4.0-1 FreePBX freePBX-2.8.1-16 Asterisk asterisk-1.8.20.0-0 asterisk-perl-0.10-2 asterisk-addons-1.8.20.0-0

1 Extensión 1 Troncal con salida a PSTN 1 MOD – MODIFICACION DE LA TABLA CC_SIP_BUDIES [root@localhost ~]# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 32 Server version: 5.0.95 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>

En la consola de MYSQL corremos estas 3 instrucciones: ALTER TABLE `cc_sip_buddies` CHANGE `lastms` `lastms` INT( 11 ) NOT NULL; ALTER TABLE `cc_sip_buddies` CHANGE `canreinvite` `canreinvite` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'YES'; ALTER TABLE `cc_sip_buddies` CHANGE `setvar` `setvar` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;

2 MOD – CREACION DE ARCHIVOS FALTANTES Y ASIGNACION DE PERMISOS [root@localhost ~]# touch /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# touch /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# touch /etc/asterisk/additional_sip.conf [root@localhost ~]# echo \#include additional_a2billing_iax.conf >> /etc/asterisk/iax.conf [root@localhost ~]# echo \#include additional_a2billing_sip.conf >> /etc/asterisk/sip.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# chown -Rf root /etc/asterisk/additional_sip.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_a2billing_iax.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_a2billing_sip.conf [root@localhost ~]# chown -Rf asterisk /etc/asterisk/additional_sip.conf

Page 2: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

2 MOD – CREACION DE ARCHIVOS FALTANTES Y ASIGNACION DE PERMISOS Agregar el siguiente contexto en el archivo extension_custom.conf y aplicar el include del contexto [from-internal-custom] exten => 1234,1,Playback(demo-congrats) ; extensions can dial 1234 exten => 1234,2,Hangup() exten => h,1,Hangup() include => agentlogin include => conferences include => calendar-event include => weather-wakeup include => a2billing ----- agregar esta linea ;agregar este contexto al final del archivo [a2billing] exten => _X.,1,Answer exten => _X.,n,Wait(1) exten => _X.,n,DeadAGI(a2billing.php,1) exten => _X.,n,Hangup En sip_custom.conf agregar el siguiente include: #include additional_a2billing_sip.conf

Con hacemos que Asterisk reconozca los clientes SIP de A2Billing. En iax_custom.conf al agregar el siguiente include: #include additional_a2billing_iax.conf

Con hacemos que Asterisk reconozca los clientes IAX2 de A2Billing. Recargar asterisk [root@localhost ~]# asterisk –rx “reload”

Page 3: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CONFIGURACION ELASTIX Troncal CUSTOM para conectarnos con A2Billing Luego por el lado de elastix se crea una troncal custom con el dial plan a utilizar y en el dial string Trunk name: A2B/1 Dialed number manipulation rules – se colocar los prefijos para que quede asociada con a2billing al momento de sacar una llamada. Custom Dial String: Local/$OUTNUM$@a2billing/n

Page 4: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

Ruta saliente hacia a2billing Se asocia la ruta saliente para enviar la llamada hacia a2billing

Page 5: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

Troncal de salida a PSTN Se verifica tener salida a PSTN Dato clave, el nombre de la troncal: Troncalbq1 – este dato lo vamos a necesitar en a2billing

Page 6: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CONFIGURACIONES EN A2BILLING Acceder al panel de administración de A2Billing Administrador https://tudireccionip/a2billing/admin usuario: admin contraseña: tupasswordgui Clientes https://tudireccionip/a2billing/customer usuario: el asignado al momento de crearlo contraseña: la asignada al momento de crearlo CREACION DE PROVEEDOR El nombre que se desee, solo es un valor referencial, sin embargo nos sirve para agrupar informes por determinado proveedor.

Page 7: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CREACION TRONCAL Muy importante esta parte, pues es donde se conecta A2billing con la troncal definida en Elastix para la salida de llamadas

1. Asociamos esta troncal con el proveedor creado 2. Label, la etiqueta que se le crea a la troncal, solo es informativa 3. Tecnología a usar, como es una troncal SIP, asi mismo se coloca. 4. Proveedor IP, aquí es el punto mas importante, pues se coloca el nombre de la troncal definida en

elastix, se deben respetar mayúsculas y minisnuculas, para nuestro caso: Troncalbq1 El resto de parámetros pueden quedar por defecto, sin embargo si tuviéramos una segunda troncal podríamos definir Failover.

1

2

3

4

Page 8: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CREACION RATECARD

1. Se define el nombre el nombre del tariffname 2. Se revisa la fecha de expiración, ojo con esta fecha pues a veces queda en 0000-00-00 y no nos

funciona 3. Se asocia la troncal creada en el paso anterior

1

2

3

Page 9: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CREACION DE TARIFAS

1. Se asocia la tarifa al ratecard 2. Se coloca el prefijo asociado 3. Se define el destino, esta lista ya viene predefinida 4. Se coloca la tarifa a cobrar 5. Buyrate min duratation se define para la frecuencia de cobro, por seg, por minuto, etc, el tiempo

se da en segundos. 6. Se define la troncal asociada

1

2

3

4

5

6

Page 10: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CREACION DE CALLPLAN

1. Se define el nombre del callplan 2. Se agrega el ratecard que ya se había definido

1

2

Page 11: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

CREACION DE CLIENTES

1. Balance Inicial 2. Datos básicos del cliente 3. Modo de facturación – prepagado o postpagado 4. Lenguaje 5. Activar el servicio 6. Agregar Callerid – Este es el número de extensión de Elastix

1

2

3

4

5

Page 12: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

6

Page 13: Interactuando con a2billing

Webinar integración A2billing en Elastix 11-03-2015

VALORES GLOBALES Cambiar estos valores en la lista global

Asterisk Version asterisk_version 1_6

Auto Set CLID auto_setcallerid Yes

CLID Enable cid_enable Yes

Ask PIN cid_askpincode_ifnot_callerid No

Dial Command Params dialcommand_param ,60,RLIW(%timeout%:60000:30000)

Use DNID use_dnid Yes

INTEGRACION DE A2BILLING CON EXTENSIONES

1. El accountcode que se coloca es el account number del usuario de a2billing

1