Instalar un sistema de facturación para Asterisk

Imagen de RazaMetaL

Instalar un sistema de facturación para Asterisk.

Asterisk nos permite tener telefonía IP con varios protocolos y con varios proveedores, esto es genial porque nos permite ahorrar en nuestras comunicaciones, en especial las de larga distancia. La siguiente guía describe como instalar A2billing para Asterisk. A2billing es un completo sistema de tarificación para Asterisk, es decir que nos muestra el importe a cobrar de acuerdo al tiempo de duración y destino de una llamada. Un sistema de tarificación puede ser utilizado en un locutorio público, hotel, etc. El administrador puede modificar y ejecutar tareas que controlen el sistema a través de una interfaz web. El operador tiene una interfaz diferente donde se muestra el reporte horario y el importe de las llamadas realizadas.

Con la presente configuración una persona levantará el auricular, discará el número y al terminar la llamada en la pantalla del operador aparecera la duración de la llamada y su importe monetario. También nos permitirá obtener datos estadísticos de la actividad y minutos consumidos por destino. Nos permitira también dar un periodo inicial de gracia en tiempo para que no se cobren llamadas que no sean conectadas.

Para visualizar los gráficos estadísticos requierimos de un paquete externo llamado jpgraph y se lo puede descargar desde [url]http://web.comhem.se/jpgraph/jpgdownloads/jpgraph-2.1.4.tar.gz[/url] . Lo podemos instalar con aptitude para php4 (no para php5):


aptitude install libphp-jpgraph

Para instalar A2billing es necesario tener instalado Asterisk. En el siguiente link esta un manual anterior de mi autoria en el cual se detalla el proceso de instalación de Asterisk y FreePBX en Debian y Ubuntu para administrar nuestro PBX sin necesidad de ser un gurú. Al igual que en la presente guía, el mismo procedimiento de instalación puede ser aplicado para cualquier otra distribución, claro esta obiando la parte en la que se hace referencia a la utilización de herramientas de Debian como apt-get, aptitude y la ubicación del 'DocumentRoot' de Apache.

El link para instalar FreePBX en Debian es: [url]http://www.ecualug.org/?q=2006/04/06/comos/instalar_asterisk_y_freepbx_en_debian[/url]

Una vez que Asterisk y FreePBX estan funcionando es hora de instalar A2billing. Necesitamos algunos paquetes adicionales para que A2billing pueda ser instalado, estos son:

php-pcntl : revisamos si lo tenemos instalado con el comando 'php -m | grep pcntl'. Si la salida de este comando no nos muestra nada es porque nos hace falta php5-cli, lo instalamos:


aptitude install php5-cli

1.- Descargamos a2billing:

cd /usr/src
mkdir a2billing
cd a2billing
wget http://asterisk2billing.org/download.php?get=Asterisk2Billing_release_Chameleon_v1_2_2.tar.gz
tar -zvxf Asterisk2Billing_release_Chameleon_v1_2_2.tar.gz
cd trunk

2.- Preparamos la base de datos mysql:

Creamos el usuario con el script que a2billing tiene para este efecto, los parámetros predefinidos son los siguientes y se pueden modificar mas adelante:


Database name is: mya2billing
Database user is: a2billinguser
User password is: a2billing


cd /usr/src/a2billing/trunk/DataBase/mysql/Mysql-5.x
mysql -u root -p"password_de_root" < a2billing-MYSQL-createdb-user.sql

Creamos la base de datos y su estructura con el script, pero antes agregaremos una línea que indica que base de datos vamos a utilizar, caso contrario el script se detendrá y nos dará un mensaje de error:


--
-- A2Billing database - Create database schema
--

# Agregamos esta línea
USE mya2billing;

Ejecutamos el script para crear la estructura de la base mya2billing:

mysql -u root -p"password_de_root" < a2billing-mysql-schema-MYSQL.5.X-v1.2.2.sql

Si nos no ha dado error entonces podemos continuar con la configuración de a2billing.

Copiamos el archivo a2billing.conf al directorio de configuración de Asterisk:


cp /usr/src/a2billing/trunk/a2billing.conf /etc/asterisk/a2billing.conf

3.- Configuración de A2billing.
El archivo a2billing.conf contiene la información que la aplicación necesita para funcionar de manera adecuada, esto es parámetros de conección a la base de datos, parámetros de la interfaz de administración y de usuario, etc.

Modificaremos inicialmente los parámetros de conección a la base de datos:


; Global Database Setup

[database]
hostname=localhost
;port=5432
port=3306
user=a2billinguser
password=a2billing
dbname=mya2billing
;dbtype=postgres
dbtype=mysql

Luego los parámetros de la interfaz del usuario:

; CUSTOMIZATION OVER THE CUSTOMER INTERFACE
[webcustomerui]
; Enable to display the customer info payment on the customer interface - yes or no
customerinfo=yes

; Enable the Call history on the customer interface - yes or no
cdr=yes

; Enable the invoice on the customer interface - yes or no
invoice=yes

; Enable the paypal payment on the customer interface - yes or no
voucher=yes

; Enable the paypal payment on the customer interface - yes or no
paypal=yes

; Let users use Speed Dial capabilities - yes or no
speeddial=yes

; Enable the DID option on the customer interface - yes or no
did=yes

; Show Ratecard option on the customer interface - yes or no
ratecard=yes

; Show simulator option on the customer interface - yes or no
simulator=yes

; Enable the callback option on the customer interface - yes or no
callback=yes

; Enable the predictivedialer option on the customer interface - yes or no
predictivedialer=yes

; Let users use SIP/IAX Webphone (Options : yes/no)
webphone=yes

;ip address of asterisk server that would be use by the web-phone
webphoneserver=localhost

; Let users add new callerid
callerid=yes

; this is the limit of the amount of callerID that can be add by the customer
limit_callerid=5

; Define the email to send for the notification and error report - new DID assignation will be report there
error_email=tu-mail@tudomino.com

Los parámetros para permitir que un usuario nuevo se de de alta no la vamos a utlizar:

[signup]
; enable the signup module
enable_signup = 0

Los parámetros de PayPal los configuramos a nuestro gusto y antojo.

Nos saltamos hasta los parámetros para el respaldo:

[backup]

; Path to store backup of database
backup_path = /tmp

; path for gzip
gzip_exe=/bin/gzip

; path for gunzip
gunzip_exe=/bin/gunzip

; path for mysqldump
mysqldump=/usr/bin/mysqldump

; path for pg_dump
pg_dump=/usr/bin/pg_dump

; path for mysql
mysql=/usr/bin/mysql

;path for psql
psql=/usr/bin/psql

Los parámetros de la interfaz web:

; configuration for the Web interface
[webui]

; Path to store the asterisk configuration files SIP & IAX
buddy_sip_file = /etc/asterisk/sip_a2billing.conf
buddy_iax_file = /etc/asterisk/iax_a2billing.conf

; API have a security key to valid the http request, the key have to be sent after apply md5
; char should be [a-z,A-Z,0-9]
api_security_key = Ae87v56zzl34v

; API restrict the IP authorized to make a request define here the list of ips separate by ;
api_ip_auth = 127.0.0.1

; Log file to store the ecommerce API requests
api_logfile = /tmp/api_ecommerce_request.log

; Log file to store the SOAP API requests
soap_logfile = /tmp/api_soap_request.log

; Email of the admin (not used yet)
email_admin = tu-email@tudominio.com

; Card lenght
len_cardnumber = 5

; Alias-Card lenght
len_aliasnumber = 5

; Voucher lenght
len_voucher = 15

; MOH base directory
dir_store_mohmp3 = /var/lib/asterisk/mohmp3

;amount of MOH class you have created in musiconhold.conf : acc_1, acc_2... acc_10 class etc...
num_musiconhold_class = 10

;MANAGER CONNECTION PARAMETERS
manager_host = localhost
;manager_username = myasterisk
;manager_secret = mycode
manager_username = admin
manager_secret = el-mismo-secret-que-tenemos-en-/etc/asterisk/manager.conf-para-el usuario-admin

; Allow to display the help section inside the admin interface (YES - NO)
show_help = YES

; Parameter of the upload
; PLEASE CHECK ALSO THE VALUE IN YOUR PHP.INI THE LIMIT IF 2MG BY DEFAULT
my_max_file_size_import = 512000
my_max_file_size = 512000 ; in bytes

; Not used yet, goal is to upload files and use them directly in the IVR
dir_store_audio = /var/lib/asterisk/sounds/a2billing

;Parameter of the upload
my_max_file_size_audio=3072000 ; in bytes

; the file type extensions allowed to be uploaded such as "gsm, mp3, wav" (separate by ,)
file_ext_allow = gsm, mp3, wav

; the file type extensions allowed to be uploaded for the musiconhold such as "gsm, mp3, wav" (separate by ,)
file_ext_allow_musiconhold = mp3

; ENABLE THE CDR VIEWER TO LINK ON THE MONITOR FILES (YES - NO)
link_audio_file = NO

; PATH TO LINK ON THE RECORDED MONITOR FILES
monitor_path = /var/spool/asterisk/monitor
// grant access to apache user on read mode for the directory :> chmod 755 /var/spool/asterisk/monitor/

; FORMAT OF THE RECORDED MONITOR FILE
monitor_formatfile = gsm

; Display the icon in the invoice
show_icon_invoice = YES

; Display the top frame (useful if you want to save space on your little tiny screen )
show_top_frame = NO

;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = usd

; currency_choose allow you to great a set of currencies to let the customer select the most appropriate ("all" can be used)
currency_choose = usd, eur, cad, hkd

; field to export in csv from cc_card table
card_export_field_list = creationdate, username, credit, lastname, firstname

; field to export in csv from cc_voucher table
voucher_export_field_list = id, voucher, credit, tag, activated, usedcardnumber, usedate, currency

; Advanced mode - Display additional configuration option on the ratecard (progressive rates, musiconhold, ...)
advanced_mode = NO

Buscamos la sección referente al log y la modificamos de la siguiente manera:

; Active the logging of the application
; logging is optimized to write all the logs at once :D
logger_enable=YES

; File to log
log_file=/var/log/asterisk/a2billing.log

Mas configuración de la plataforma:

; play the goodbye message when the user finish
say_goodbye=NO

; enable the menu to choose the language
; press 1 for English, pulsa 2 para el español, Pressez 3 pour Français
play_menulanguage=NO

; force the use of a language, if you dont want to use it leave the option empty
; Values : ES, EN, FR, etc... (according to the audio you have install)
force_language=

; Introduction prompt : to specify an additional prompt to play at the beginning of the application
; parlezplus-intro_013centimes
intro_prompt=

; lenght of the cardnumber (amount of digits)
len_cardnumber=5

; Alias-Card lenght
len_aliasnumber = 5

; Voucher lenght
len_voucher = 15

; this is the minimum amount of credit to use the application
min_credit_2call=0

Esta parte es importante cuando quieres que los primeros segundos no sean cobrados, algunas veces sucede que la llamada no se conecta por algun motivo y si al Cliente le cobras por el intento es seguro se va a enojar y no le quedarán mas ganas de regresar. En la siguente configuración se da una gracia de 6 segundos, luego de esto el sistema empieza a tarificar.


; this is the minimum duration in seconds of a call in order to be billed
; any call with a length less than min_duration_2bill will have a 0 cost
; usefull not to charge callers for system errors when a call was answered but it actually didn't connect
min_duration_2bill=6

; if user doesnt have enough credit to call a destination XXX prompt him to enter an other cardnumber
notenoughcredit_cardnumber=NO

; if notenoughcredit_cardnumber = YES then assign the CallerID to the new cardnumber
notenoughcredit_assign_newcardnumber_cid=YES

; if YES it will catch the DNID and try to dial it out directly without asking for the phonenumber to call
; value : YES, NO
use_dnid=YES

; list the dnid on which you want to avoid the use of the previous option "use_dnid"
no_auth_dnid=2400,2300

;number of time the user can dial different number
number_try=3

; Play the balance to the user after the authentication (values : yes - no)
say_balance_after_auth=NO

; Play the balance to the user after the call (values : yes - no)
say_balance_after_call=NO

; Play the initial cost of the route (values : yes - no)
say_rateinitial=NO

; Play the time the user can call (values : yes - no)
say_timetocall=NO

; enable the presentation of a callerID number
auto_setcallerid=YES

; If set, and auto_setcallerid is enabled, the number is sent as CID always
force_callerid=

; If force_callerid is not set, then this ensures that CID is set to one of the
ccard's configured caller IDs or blank if none available.
; NO - disable this feature, caller ID can be anything.
; CID - Caller ID must be one of the customers caller IDs
; DID - Caller ID must be one of the customers DID nos.
; BOTH - Caller ID must be one of the above two items.
cid_sanitize=NO

; enable the callerid authentication
; if this option is active the CC system will check the CID of caller
cid_enable=NO

; if the cid doesnt exist you can then ask a cardnumber to the calling party in order to authenticate the caller
cid_askpincode_ifnot_callerid=NO

; if the callerID, this option will allow the system to add it automatically and create a cardnumber to hook them up.
cid_auto_create_card=NO

; if the callerID authenticate is on, this option will allow the assign the cardnumber enter to the callerID if the callerID wasnt in the DB
cid_auto_assign_card_to_cid=YES

; If cid_auto_create_card has been set to YES, the following option will define with which parameters the card will be create
;
; billing type of the new card
; ( value : POSTPAY or PREPAY)
cid_auto_create_card_typepaid=POSTPAY
; amount of credit of the new card
cid_auto_create_card_credit=0

; if postpay define here the credit limit for the card
cid_auto_create_card_credit_limit=1000

; the tariffgroup to use for the new card (this is the ID that you can find on the admin web interface)
cid_auto_create_card_tariffgroup=6

; if we want to check the callerID over the cardnumber authentication (to guard against spoofing)
callerid_authentication_over_cardnumber=NO

; enable the option to call sip/iax friend for free (values : YES - NO)
sip_iax_friends=NO

; if SIP_IAX_FRIENDS is active, you define a prefix for the dialed phonenumber to call directly a pstn number
; values : number
sip_iax_pstn_direct_call_prefix=9

; this will enable a prompt to enter your destination number_try
; if number start by sip_iax_pstn_direct_call_prefix we do directly a sip iax call, if not we do a normal call
sip_iax_pstn_direct_call=NO

; Extracharge DIDs, multiple numbers and fees must be separated by comma
;extracharge_did=1800XXXXXXX,1888XXXXXXX
extracharge_did=
;extracharge_fee=0.02,0.03
extracharge_fee=

; More information about the Dial : http://voip-info.org/wiki-Asterisk+cmd+dial
; 30 : The timeout parameter is optional. If not specifed, the Dial command
: will wait indefinitely, exiting only when the originating channel hangs up, or all
; the dialed channels return a busy or error condition. Otherwise it specifies a
; maximum time, in seconds, that the Dial command is to wait for a channel to answer.
; H: Allow the caller to hang up by dialing *
; r: Generate a ringing tone for the calling party
; m: Provide Music on Hold to the calling party until the called channel answers.
; L(x[:y][:z]): Limit the call to 'x' ms, warning when 'y' ms are left, repeated every 'z' ms)
; %timeout% tag is replaced by the calculated timeout according the credit & destination rate!

;dialcommand_param="|30|HL(%timeout%:61000:30000)"
dialcommand_param="||HrL(%timeout%:61000:30000)"

; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend="|30|HL(3600000:61000:30000)"

; Define the order to make the outbound call
; YES -> SIP/dialedphonenumber@gateway_ip - NO SIP/gateway_ip/dialedphonenumber
; Both should work exactly the same but i experimented one case when gateway was supporting dialedphonenumber@gateway_ip
; So in case of troubles, try it out
switchdialcommand=NO

; When a call find a negative route or a free route is adviced to limite the call duration : amount in secons
maxtime_tocall_negatif_free_route = 5400

; enable to send a reminder mail to the user when they are under min_credit_2call
send_reminder=NO

; enable to monitor the call (to record all the conversation)
; value : YES - NO
record_call=NO

; format of the recorded monitor file
monitor_formatfile=gsm

;base currency define the default currency that you want to use to setup your system (see the file /etc/asterisk/rates.inc to know the currency code)
base_currency = usd

; Force to play the balance to the caller in a predefined currency, to use the currency set for by the customer leave this field empty
agi_force_currency =

; CURRENCY SECTION
; Define all the audio (without extension) that you want to play according to currency (use , to separate, ie "usd:prepaid-dollar,mxn:pesos,eur:Euro,all:credit")
currency_association = usd:prepaid-dollar,mxn:pesos,eur:euro,all:credit

; Please enter here the file you want to play when we prompt the calling party to enter his destination number
; file_conf_enter_destination = prepaid-enter-number-u-calling-1-or-011
file_conf_enter_destination = prepaid-enter-dest

; Please enter here the file you want to play when we prompt the calling party to choose the prefered language
; file_conf_enter_menulang = prepaid-menulang
file_conf_enter_menulang = prepaid-menulang2

4.- Instalamos la interfaz web para la administración de A2billing para se abra cuando dirijamos el navegador a http://localhost/billing-admin . Por defecto apache en Debian tiene el parámetro DocumentRoot en /var/www :


cp -rf /usr/src/a2billing/trunk/A2Billing_UI /var/www
cd /var/www
mv A2Billing_UI billing-admin
chmow 777 /etc/asterisk
mkdir /var/lib/asterisk/mohmp3/acc_1
mkdir /var/lib/asterisk/mohmp3/acc_2
mkdir /var/lib/asterisk/mohmp3/acc_3
mkdir /var/lib/asterisk/mohmp3/acc_4
mkdir /var/lib/asterisk/mohmp3/acc_5
mkdir /var/lib/asterisk/mohmp3/acc_6
mkdir /var/lib/asterisk/mohmp3/acc_7
mkdir /var/lib/asterisk/mohmp3/acc_8
mkdir /var/lib/asterisk/mohmp3/acc_9
mkdir /var/lib/asterisk/mohmp3/acc_10
chmod 777 /var/lib/asterisk/mohmp3/acc_*

5.- Modificamos los archivos de configuración de Asterisk para habilitar A2billing:
Agregamos al final de sip.conf:

#include sip_a2billing.conf

Agregamos al final de iax.conf:

#include iax_a2billing.conf

Agregamos al final de /etc/asterisk/musiconhold.conf :

; class definitions For A2Billing
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_1
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_2
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_3
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_4
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_5
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_6
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_7
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_8
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_9
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_10

Editamos extensions_custom.conf para agregar el contexto a2billing que utilizarán las extensiones a las cuales queremos tarificar:

[a2billing]
exten => _X.,1,Answer
exten => _X.,2,Wait,2
exten => _X.,3,DeadAGI,a2billing.php
exten => _X.,4,Wait,2
exten => _X.,5,Hangup

6.- Dirigimos nuestro navegador hacia http://localhost/billing-admin e ingresamos con la siguiente información:

login: root
passwd: myroot

ó

login: admin
passwd: mypassword

Recuerden cambiar la contraseña desde la interfaz de administración.

7.- Instalamos la interfaz para el usuario final/Cliente/Operador para que sea accesible desde http://localhost/billing :

cp -rf /usr/src/a2billing/trunk/A2BCustomer_UI /var/www/billing

8.- Instalamos los scripts AGI:

cd /usr/src/a2billing/trunk/A2Billing_AGI
cp a2billing.php /var/lib/asterisk/agi-bin/.
cp -rf libs_a2billing /var/lib/asterisk/agi-bin/.
chmod +x /var/lib/asterisk/agi-bin/a2billing.php
cp /usr/src/a2billing/trunk/A2Billing_AGI/sounds/* /var/lib/asterisk/sounds/.
cp /usr/src/a2billing/trunk/A2Billing_AGI/sounds/en/* /var/lib/asterisk/sounds/.

9.- Un detalle que me parece importante es el saber desde que dispositivo se hizo la llamada. Es posible que varios dispositivos utilizen una misma tarjeta pero el operador no va a saber desde que dispositivo se hizo una llamada que debe cobrar y esto puede ser un problema.

La siguiente modificación mostrará en los reportes una columna adicional llamada source que indica la extension desde la que se realizó la llamada.

Modificamos el archivo balance.php que se encuentra en /var/www/billing :

cd /var/www/billing/balance.php

Donde dice (en la línea 113):

$FG_COL_QUERY='t1.starttime, t1.calledstation, t1.destination, t1.sessiontime,t1.username, t1.terminatecause, t1.sipiax, t1.calledrate, t1.sessionbill';

Debe decir:

$FG_COL_QUERY='t1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.username, t1.terminatecause, t1.sipiax, t1.calledrate, t1.sessionbill';

Y donde dice:

//$FG_TABLE_COL[]=array ("Source", "source", "20%", "center", "SORT", "30");

Debe decir:

$FG_TABLE_COL[]=array ("Source", "src", "9%", "center", "SORT", "30")

Finalmente reinciamos asterisk para aplicar los cambios:

asterisk -r -x "reload"

Comentarios

Entonces (3) esta tras

Imagen de RazaMetaL

Entonces (3) esta tras (2)?

De ser así necesitas redireccionar puertos con iptables en (2) hacia (3).

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

Antes de preguntar visita el [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

 

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

-----

Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

(adsbygoogle = window.adsbygoogle || []).push({});

arrgle

Imagen de kemrhi

arregle el problema con el apache, ahora puedo entrar al ip(3) desde el pc(1), sin embargo aun me manda el error inicial Invalid card number lenght defined in configuration. la base de datos eso si ya esta lista

gracias de nuevo y espero su ayuda.

duda

Imagen de kemrhi

al final lo arrgle todo, era un error muy simple, pero esos son los q mas desaperibidos pasan.

ahora bien tengo una pregunta, que pasaria si yo dejara el asterisk corriendo en un servidor y el billing en otro? porsian interactuar entre ellos? como se puede configurar eso?

espero l respuesta

ERROR #include sip_a2billing.conf

Imagen de KORO

Soy nuevo en a2billing lo he instalado siguiendo la guia de razametal
entro a la interfaz de administracion
http://localhost/billing-admin normal pero cuando creo mi cliente sip
en el a2billing crea normal el archivo sip_a2billing.conf
pero cuando intento ver los sip feinds en mi asterisk no sale nada

y cuando hago un reload me sale error justo en la linea #include sip_a2billing.conf que agrege a sip.conf
como que no la reconoce
he probado copiar o del archivo sip_a2billing.conf a mi sip.conf (esto lo hize para hacerlo tabajar a lo bestia XD) ay si muestra las extensiones incluso puedo realizar la marcacion de prueba q me pide el pin
por lo que supongo el a2billing este bien instalado pero
cuando lo dejo normal con el #include sip_a2billing.conf me sigue saliendo el error como q no reconcoe esta linea mi asterisk
porfavor alguna ayuda se los agradeceria mucho

Problema con la interfaz web

Configure a2billing siguiendo el turorial de RazaMetal (gracias, esta genial)

El problema es que al abrir la pagina http://localhost/billing-admin e introducir el loggin la pagina queda en blanco.
Supongo que el problema puede ser a nivel de la conexion con la base de datos, no lo se.
Paso parte de la configuracion haber si alguien ve algo mal que no me de cuenta.

***En a2billing.conf :***

; Global Database Setup

[database]
hostname=localhost
;port=5432
port=3306
user=a2billinguser
password=a2billing
dbname=mya2billing
;dbtype=postgres
dbtype=mysql

; configuration for the Web interface
[webui]

; Path to store the asterisk configuration files SIP & IAX
buddy_sip_file = /etc/asterisk/sip_a2billing.conf ;(se supone que estos 2 ficheros deben existir
buddy_iax_file = /etc/asterisk/iax_a2billing.conf ;en ese directorio? Yo no los tengo :s)

;MANAGER CONNECTION PARAMETERS
manager_host = localhost
;manager_username = myasterisk
;manager_secret = mycode
manager_username = admin
manager_secret = "la clave que puse en manager.conf que pongo debajo"

***En manager.conf:***
[myasterisk]

secret = "la misma clave que en a2billing.conf => manager_secret"
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

***En sip.conf:***
#include sip_a2billing.conf

***En iax.conf:***
#include iax_a2billing.conf

Agradecere cualquier ayuda.

Cita: ; Global Database

Imagen de RazaMetaL

[quote]; Global Database Setup

[database]
hostname=localhost
;port=5432
port=3306
user=a2billinguser
password=a2billing
dbname=mya2billing
;dbtype=postgres
dbtype=mysql[/quote]

Verifica si ese usuario existe en mysql:


mysql -u a2billinguser -pa2billing mya2billing

[quote]
; configuration for the Web interface
[webui]

; Path to store the asterisk configuration files SIP & IAX
buddy_sip_file = /etc/asterisk/sip_a2billing.conf ;(se supone que estos 2 ficheros deben existir
buddy_iax_file = /etc/asterisk/iax_a2billing.conf ;en ese directorio? Yo no los tengo :s)[/quote]

Si /etc/asterisk tiene los permisos suficientes y nesarios, entonces esos archivos los creará a2billing al momento que apliques los cambios luego de crear un sip/iax friend.

Ahora, revisa el log de apache, ahi puedes encontrar el porqué no es mostrada la página.

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

Antes de preguntar visita el [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

 

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

-----

Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

(adsbygoogle = window.adsbygoogle || []).push({});

La base funciona

La base funciona correctamente, al comando:
mysql -u a2billinguser -pa2billing mya2billing
me responde ok. entra al mysql y puedo hacer un use mya2billing y un show tables y veo todo ok.

Ahora el error cambio, antes era una pagina en blanco, pero agrege unas lineas en el manager.conf que obtuve de tu otra guia de a2billing. No estoy seguro que fuera eso pero ahora me da "BLOCKED ACCOUNT, Please contact your administrator!" lo cual es mucho mejor que lo anterior pero igual de frustrante.

aparentemente el usuario o la clave no es correcta (supongo) pero veo la configuracion y es la que uso.

Se supone que debe ser la que se configura en el a2billing.conf
;MANAGER CONNECTION PARAMETERS
manager_host = localhost
;manager_username = myasterisk
;manager_secret = mycode
manager_username = admin
manager_secret = "la password"

Tambien me fije que "la password" sea igual en manager.conf
Puede ser que el problema no sea de loggin y sea de configuracion?

Por si ayuda, uso Centos 5.0, MySQL 5, PHP 5.1

A2billing tiene dos

Imagen de RazaMetaL

A2billing tiene dos interfaces.. la de usuario y la de administrador. Supongo que quieres ingresar en la de administrador? debes usar el usuario/contraseña admin/mypassword también creo que funciona root/myroot. Si ingresas esos usuarios en la interfaz de usuario, vas a obtener el mensaje de ACCOUNT BLOCKED.

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

Antes de preguntar visita el [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

 

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

-----

Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

(adsbygoogle = window.adsbygoogle || []).push({});

vale, entiendo el

vale, entiendo el concepto.
lo que no entiendo es como diferenciar cuando es interfaz usuario y cuando es interfaz administrador.

Asi configure el acceso WEB:

cp -rf /usr/src/a2billing/trunk/A2Billing_UI /var/www/html ; cambie el destino porque en www no funcionaba y en
; un manual para Centos lo ponian en /var/www/html
cd /var/www/html
mv A2Billing_UI billing-admin
chmow 777 /etc/asterisk
mkdir /var/lib/asterisk/mohmp3/acc_1
mkdir /var/lib/asterisk/mohmp3/acc_2
mkdir /var/lib/asterisk/mohmp3/acc_3
mkdir /var/lib/asterisk/mohmp3/acc_4
mkdir /var/lib/asterisk/mohmp3/acc_5
mkdir /var/lib/asterisk/mohmp3/acc_6
mkdir /var/lib/asterisk/mohmp3/acc_7
mkdir /var/lib/asterisk/mohmp3/acc_8
mkdir /var/lib/asterisk/mohmp3/acc_9
mkdir /var/lib/asterisk/mohmp3/acc_10
chmod 777 /var/lib/asterisk/mohmp3/acc_*

luego voy al navegador y pongo http://localhost/billing-admin y abre la interfaz de login pero no se
cual es. Prove con root / myroot, admin / mypassword , a2billinguser / a2billing (ya se que no es), y con
las de usuario y password que defini en el manager.conf y a2billing.conf

Páginas