Instalar un sistema de facturacion para Asterisk | A2billing 1.3

Imagen de RazaMetaL

A2billing 1.3 es la nueva version del software para callingcards para Asterisk.

Para esta instalacion he utilizado:
- Debian 4.0
- Asterisk 1.4
- Mysqld 5.0
- PHP 5.0
- Apache 2

Manos a la obra, lo primero es instalar dependencias:


aptitude install libphp-jpgraph mysql-server apache2 php5-mysql build-essential libmysqlclient-dev php5-gd

Obtener a2billing:

cd /usr/src/
wget http://a2billing.net/downloads/A2Billing_1.3.0.tar.gz
tar zvxf A2Billing_1.3.0.tar.gz
cd A2Billing_1.3.0

Dar privilegios a usuario a2billinguser en la base de datos:

mysql

Ingresamos lo siguiente:

use mysql;
GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'%' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON mya2billing.* TO 'a2billinguser'@'localhost.localdomain' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;
/q

Crear la base de datos mya2billing:

mysqladmin create mya2billing -u a2billinguser -pa2billing

Estoy usando la version 5.0.45:

mysql --version
mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i486) using readline 5.2

Debere cargar entonces la estructura de las tablas para la version 5.x:

cd /usr/src/A2Billing_1.3.0/DataBase/mysql/Mysql-5.x
mysql mya2billing -u a2billinguser -pa2billing < a2billing-mysql-schema-MYSQL.5.X-v1.3.0.sql

Copiamos a2billing.conf :

cp /usr/src/A2Billing_1.3.0/a2billing.conf /etc/asterisk/

Modificamos los parametros de la base de datos:

; Global Database Setup - select the database type and authentication as required.

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

Instalamos la interfaz de administrador de a2billing, vamos a instalarlo en [url]http://localhost/billing[/url]:

cp -rf /usr/src/A2Billing_1.3.0/A2Billing_UI /var/www/billing
chmod 777 /var/www/billing/templates_c

Instalamos la interfaz de usuario de a2billing, vamos a instalar en [url]http://localhost/customer[/url]:

cp -rf /usr/src/A2Billing_1.3.0/A2BCustomer_UI/ /var/www/customer
chmod 777 /var/www/customer/templates_c

Creamos los directorios para musica en espera:

mkdir /var/lib/asterisk/mohmp3/
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
chmod 777 /var/lib/asterisk/mohmp3/acc_*
chmod 777 /etc/asterisk
mkdir /var/lib/asterisk/sounds/a2billing
chmod 777 /var/lib/asterisk/sounds/a2billing

Configuramos manager.conf:

vi /etc/asterisk/manager.conf

[general]
displaysystemname = yes
enabled = yes
;webenabled = yes
port = 5038
bindaddr = 0.0.0.0

[a2billing]
secret = mya2billing
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

Editamos el archivo de musica en espera:

vi /etc/asterisk/musiconhold.conf

acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_1
acc_2 => mp3:/var/lib/asterisk/mohmp3/acc_2
acc_3 => mp3:/var/lib/asterisk/mohmp3/acc_3
acc_4 => mp3:/var/lib/asterisk/mohmp3/acc_4
acc_5 => mp3:/var/lib/asterisk/mohmp3/acc_5
acc_6 => mp3:/var/lib/asterisk/mohmp3/acc_6
acc_7 => mp3:/var/lib/asterisk/mohmp3/acc_7
acc_8 => mp3:/var/lib/asterisk/mohmp3/acc_8
acc_9 => mp3:/var/lib/asterisk/mohmp3/acc_9

Instalamos los scripts AGI de a2billing:

cp /usr/src/A2Billing_1.3.0/A2Billing_AGI/a2billing.php /usr/share/asterisk/agi-bin/.
cp -rf /usr/src/A2Billing_1.3.0/A2Billing_AGI/libs_a2billing /usr/share/asterisk/agi-bin/.
chmod +x /usr/share/asterisk/agi-bin/a2billing.php

Si hemos compilado asterisk a mano la ruta para los scripts agi-bin es /var/lib/asterisk/agi-bin :

mkdir -p /var/lib/asterisk/agi-bin/
cp /usr/src/A2Billing_1.3.0/A2Billing_AGI/a2billing.php /var/lib/asterisk/agi-bin/.
cp -rf /usr/src/A2Billing_1.3.0/A2Billing_AGI/libs_a2billing /var/lib/asterisk/agi-bin/.
chmod +x /var/lib/asterisk/agi-bin/a2billing.php

Copiamos los archivos de sonido:

cp /usr/src/A2Billing_1.3.0/addons/sounds/* /var/lib/asterisk/sounds/.
cp /usr/src/A2Billing_1.3.0/addons/sounds/en/* /var/lib/asterisk/sounds/.
cp /usr/src/A2Billing_1.3.0/addons/sounds/es/* /var/lib/asterisk/sounds/es/.

Creamos un contexto para a2billing :

vi /etc/asterisk/extensions.conf

[a2billing]
; CallingCard application
exten => _X.,3,DeadAGI,a2billing.php
exten => _X.,5,Hangup

Agregarmos la siguiente línea en sip.conf :

#include sip_a2billing.conf

Y en iax.conf :

#include iax_a2billing.conf

En a2billing.conf debemos hacer referencia a estos archivos en la sección [webui]:

[webui]
buddy_sip_file = /etc/asterisk/sip_a2billing.conf
buddy_iax_file = /etc/asterisk/iax_a2billing.conf

Queda solamente editar el archivo de configuracion /etc/asterisk/a2billing.conf y adaptar sus opciones a nuestras necesidades.

Comentarios

hola, instale como esta en

Imagen de monica

hola, instale como esta en el manual
Tengo instalado esto

- Cent os 5
- Asterisk 1.4
- Mysqld 5.0
- PHP 5.0
- Apache 2

salio todo bien en la instalacion y configuracion, pero cuando marco un numero sona el telefono normal y cuando atende el telefono se corta.

En la consula sale esto

[quote] a2billing.php:
a2billing.php: file:Class.A2Billing.php - line:601 - get_agi_request_parameter = 3000 ; SIP/3000-086cfc40 ; 1189212814.53 ; 3000 ; 543424741465
-- Remote UNIX connection
-- Remote UNIX connection disconnected
a2billing.php: file:a2billing.php - line:138 - [ANSWER CALL]
a2billing.php: file:Class.A2Billing.php - line:1668 - SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix, redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate), UNIX_TIMESTAMP(cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email, cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias FROM cc_card LEFT JOIN cc_tariffgroup ON tariff=cc_tariffgroup.id WHERE username='3000'
a2billing.php: file:Class.A2Billing.php - line:1742 - [SET LANGUAGE() es]
a2billing.php: file:Class.A2Billing.php - line:634 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse+1 WHERE username='3000']
a2billing.php: file:Class.A2Billing.php - line:1427 - [AUTO SetCallerID]
a2billing.php: file:Class.A2Billing.php - line:1433 - [REQUESTED SetCallerID : 3000]
a2billing.php: file:Class.A2Billing.php - line:1444 - [EXEC SetCallerID : 3000]
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - 1 && && 12&& 0
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> 543424741465
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> 543424741465
a2billing.php: file:Class.A2Billing.php - line:721 - OK - RESFINDRATE::> 1
a2billing.php: file:Class.A2Billing.php - line:743 - RES_ALL_CALCULTIMEOUT ::> 1
a2billing.php: file:Class.A2Billing.php - line:760 - TIMEOUT::> 60000 : minutes=1000 - seconds=0
a2billing.php: file:Class.RateEngine.php - line:960 - app_callingcard: Dialing 'SIP/proveedorsip/00543424741465|60|HRrL(60000000:61000:30000)' with timeout of '60000'.
a2billing.php:
a2billing.php: file:Class.RateEngine.php - line:985 - app_callingcard: CIDGROUPID='-1' OUTBOUND CID SELECTED IS '0'.
-- AGI Script Executing Application: (Dial) Options: (SIP/proveedorsip/00543424741465|60|HRrL(60000000:61000:30000))
-- Limit Data for this call:
> timelimit = 60000000
> play_warning = 61000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = timeleft
> end_sound = (null)
-- Called proveedorsip/00543424741465
-- SIP/proveedorsip-086d14f0 is making progress passing it to SIP/3000-086cfc40
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- Remote UNIX connection
-- Remote UNIX connection disconnected
-- SIP/proveedorsip-086d14f0 answered SIP/3000-086cfc40
a2billing.php: file:Class.RateEngine.php - line:1090 - [USEDRATECARD=0]
a2billing.php: file:Class.RateEngine.php - line:848 - [CC_asterisk_stop QUERY = INSERT INTO cc_call (uniqueid,sessionid,username,nasipaddress,starttime,sessiontime, calledstation, terminatecause, stoptime, calledrate, sessionbill, calledcountry, calledsub, destination, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buyrate, buycost, id_card_package_offer) VALUES ('1189212814.53', 'SIP/3000-086cfc40', '3000', '', CURRENT_TIMESTAMP - INTERVAL 0 SECOND , '0', '543424741465', '', now(), '0.01', '-0', '', '', 'argentina', '1', '1', '1', '2', '3000', '0', '0', '0', '0')]
a2billing.php: file:Class.RateEngine.php - line:851 - [CC_asterisk_stop 1.1: SQL: DONE : result=1]
a2billing.php: file:a2billing.php - line:309 - [a2billing account stop]
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - 0 && && 12&& 1
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> -1
a2billing.php: file:a2billing.php - line:169 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php: file:a2billing.php - line:170 - [CREDIT : 10.00000][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php: file:Class.A2Billing.php - line:656 - 0 && && 12&& 2
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:634 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='3000']
-- AGI Script a2billing.php completed, returning 0

La causa del problema no

Imagen de RazaMetaL

La causa del problema no esta en a2billing. Es probable que sea entrealgun tipo de problema de negociación de codecs entre la extension y asterisk o entre el proveedor y asterisk.

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

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({});

callback

Imagen de monica

Hola, gracias por sus respuestas, mi problema ahora es configurar el calback y el
IAX WEB-PHONE.
Me podes ayudar con esto?
Muchas gracias

No salen las llamadas

Hola !!!

he seguido las instrucciones de este manual, los anexos sip se crean en el archivo additional_a2billing_sip.conf y se loguean correctamente, lo pudo comprobar con el comando sip show peers, desde la CLI de asterisk. He configurado un proveedor de VoIP y con los anexos creados aparte en el archivo sip.conf si puedo llamar bien.

Pero cuando intento llamar desde las extensiones creada por a2billing, la llamada no sale del asterisk, y luego se cuelga repentinamente. :(

el CLi de asterisk muestra estos mensajes en el momento justo de la llamada:

[Sep 25 10:26:22] WARNING[3317]: channel.c:2995 set_format: Unable to find a codec translation path from g729 to gsm
[Sep 25 10:26:22] WARNING[3317]: file.c:866 ast_streamfile: Unable to open prepaid-enter-dest (format 0x100 (g729)): No such file or directory
a2billing.php: file:Class.A2Billing.php - line:663 - RES DTMF : -1
a2billing.php: file:Class.A2Billing.php - line:681 - DESTINATION ::> -1
a2billing.php: file:Class.A2Billing.php - line:683 - RULES APPLY ON DESTINATION ::> -1
[Sep 25 10:26:22] WARNING[3317]: channel.c:2995 set_format: Unable to find a codec translation path from g729 to gsm
a2billing.php: file:Class.A2Billing.php - line:634 - [CARD STATUS UPDATE : UPDATE cc_card SET inuse=inuse-1 WHERE username='7142953479']
-- AGI Script a2billing.php completed, returning 0
[Sep 25 10:26:38] WARNING[2330]: chan_sip.c:12228 handle_response_register: Got 200 OK on REGISTER that isn't a register

En extensions.conf he creado el contexto:
[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

Y los anexos del additional_a2billing_sip.conf responden a esa extension. Ejemplo:

[7400142759]
type=friend
username=7400142759
accountcode=7400142759
regexten=7400142759
callerid=102
amaflags=billing
secret=1234
nat=yes
dtmfmode=RFC2833
qualify=yes
canreinvite=yes
disallow=all
allow=ulaw
allow= alaw
allow= gsm
allow= g729
host=dynamic
context=a2billing
regseconds=0
cancallforward=yes

¿Alguna idea?
Ayuda Porfa !!

hola, e podido instalar e

Imagen de monica

hola, e podido instalar e configurar el a2billing perfectamente, pero no puedo llamar entre extenciones del servidor, para otras cuentas de otros servidores si.
Por favor ayuda!!!!!

Para llamar entre

Imagen de RazaMetaL

Para llamar entre extensiones creadas con a2billin debes anteponer el dígito que hallas especificado en el campo sip_iax_pstn_direct_call_prefix =

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

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({});

Gracias, pude llamar, muchas

Imagen de monica

Gracias, pude llamar, muchas gracias.

Ahora otro problemita, cuando llamo el reloj empesa a marcar desde cuando marco el ultimo numero, como aregulo esto, para que solo me empese el reloj cuando atendan la llamada.
Muchas gracias

[quote][agi-conf1]

; the debug level
; 0=none, 1=low, 2=normal, 3=all
debug = 1

; Asterisk Version Information
; 1_1,1_2,1_4 By Default it will take 1_2 or higher
asterisk_version = 1_2

; Manage the answer on the call
answer_call = NO

; Play audio - this will disable all stream file but not the Get Data
; for wholesale ensure that the authentication works and than number_try = 1
play_audio = YES

; play the goodbye message when the user has finished.
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 installed)
force_language =

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

; Minimum amount of credit to use the application
min_credit_2call = 0

; 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
; useful not to charge callers for system errors when a call was answered but it actually didn't connect
min_duration_2bill = 0

; if user doesn't have enough credit to call a destination, prompt him to enter another cardnumber
notenoughcredit_cardnumber = YES

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

; if YES it will use the DNID and try to dial out, 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 times the user can dial different number
number_try = 3

; this will force to select a specific call plan by the Rate Engine
force_callplan_id =

; 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 amount of time that the user can call (values : yes - no)
say_timetocall = NO

; enable the setup of the callerID number before the outbound is made, by default the user callerID value will be use
auto_setcallerid = YES

; If auto_setcallerid is enabled, the value of force_callerid will be set as CallerID
force_callerid =

; If force_callerid is not set, then the following option ensures that CID is set to one of the card'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 does not exist, then the caller will be prompt to enter his cardnumber
cid_askpincode_ifnot_callerid = YES

; if the callerID authentication is enable and the authentication fails then the user will be prompt to enter his cardnumber
; this option will bound the cardnumber entered to the current callerID so that next call will be directly authenticate
cid_auto_assign_card_to_cid = YES

; if the callerID is captured on a2billing, this option will create automatically a new card and add the callerID to it
cid_auto_create_card = NO

; set the length of the card that will be auto create (ie, 10)
cid_auto_create_card_len = 10

; If cid_auto_create_card has been set to YES, the following options will define with which configuration we will create the card
;
; 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 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

; to check 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 = YES

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

; this will enable a prompt to enter your destination number.
; 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 = YES

; enable the option to refill card with voucher in IVR (values : YES - NO)
ivr_voucher = NO

; if ivr_voucher is active, you can define a prefix for the voucher number to refill your card
; values : number - don't forget to change prepaid-refill_card_with_voucher audio accordingly
ivr_voucher_prefix = 8

; When the user credit are below the minimum credit to call min_credit
; jump directly to the voucher IVR menu (values: YES - NO)
jump_voucher_if_min_credit = 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
; R: Indicate ringing to the calling party when the called party indicates ringing, pass no audio until answered.
; 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 = "|90|HRrC(%timeout%:61000:50000)"

; by default (3600000 = 1HOUR MAX CALL)
dialcommand_param_sipiax_friend = "|60|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 trouble, try it out
switchdialcommand = NO

; failover recursive search - define how many time we want to authorize the research of the failover trunk when a call fails (value : 0 - 20)
failover_recursive_limit = 2

; For free calls, limit the duration: amount in seconds
maxtime_tocall_negatif_free_route = 5400

; Send a reminder email to the user when they are under min_credit_2call
send_reminder = NO

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

; format of the recorded monitor file
monitor_formatfile = gsm

; 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 file extensions) that you want to play according to currency (use , to separate, ie "usd:prepaid-dollar,mxn:pesos,eur:Euro,all:credit")
currency_association = usd:dollars,mxn:pesos,eur:euros,all:credit

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

; Please enter the file name 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

; Define if you want to bill the 1st leg on callback even if the call is not connected to the destination
callback_bill_1stleg_ifcall_notconnected = YES
[/quote]

No llama

Segui los pasos de la instalacion, pude cargar la informacion de rutas, tarifas, usuarios, etc.
Pero cuando un usuario llama me aparece esto[1] en el CLI
Es como que el AGI se ejecuta con algun problema porque termina de parsear el archivo de configuracion y termina el AGI sin hacer nada

[1]
-- Executing [11541148645784@a2billing:1] Answer("IAX2/4069575193-4", "") in new stack
-- Executing [11541148645784@a2billing:2] Wait("IAX2/4069575193-4", "2") in new stack
-- Executing [11541148645784@a2billing:3] AGI("IAX2/4069575193-4", "a2billing.php|1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
a2billing.php|1: A2Billing AGI internal configuration:
a2billing.php|1: Array
a2billing.php|1: (
a2billing.php|1: [debug] => 3
a2billing.php|1: [asterisk_version] => 1_4
a2billing.php|1: [answer_call] => 1
a2billing.php|1: [play_audio] => 1
a2billing.php|1: [say_goodbye] => 1
a2billing.php|1: [play_menulanguage] =>
a2billing.php|1: [force_language] => ES
a2billing.php|1: [intro_prompt] =>
a2billing.php|1: [min_credit_2call] => 0
a2billing.php|1: [min_duration_2bill] => 0
a2billing.php|1: [notenoughcredit_cardnumber] => 1
a2billing.php|1: [notenoughcredit_assign_newcardnumber_cid] => 1
a2billing.php|1: [use_dnid] =>
a2billing.php|1: [no_auth_dnid] => Array
a2billing.php|1: (
a2billing.php|1: [0] => 2400
a2billing.php|1: [1] => 2300
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [number_try] => 3
a2billing.php|1: [force_callplan_id] =>
a2billing.php|1: [say_balance_after_auth] => 1
a2billing.php|1: [say_balance_after_call] => 1
a2billing.php|1: [say_rateinitial] =>
a2billing.php|1: [say_timetocall] => 1
a2billing.php|1: [auto_setcallerid] => 1
a2billing.php|1: [force_callerid] =>
a2billing.php|1: [cid_sanitize] =>
a2billing.php|1: [cid_enable] =>
a2billing.php|1: [cid_askpincode_ifnot_callerid] => 1
a2billing.php|1: [cid_auto_assign_card_to_cid] => 1
a2billing.php|1: [cid_auto_create_card] =>
a2billing.php|1: [cid_auto_create_card_len] => 10
a2billing.php|1: [cid_auto_create_card_typepaid] => POSTPAY
a2billing.php|1: [cid_auto_create_card_credit] => 0
a2billing.php|1: [cid_auto_create_card_credit_limit] => 1000
a2billing.php|1: [cid_auto_create_card_tariffgroup] => 6
a2billing.php|1: [callerid_authentication_over_cardnumber] =>
a2billing.php|1: [sip_iax_friends] =>
a2billing.php|1: [sip_iax_pstn_direct_call_prefix] => 555
a2billing.php|1: [sip_iax_pstn_direct_call] =>
a2billing.php|1: [ivr_voucher] =>
a2billing.php|1: [ivr_voucher_prefix] => 8
a2billing.php|1: [jump_voucher_if_min_credit] =>
a2billing.php|1: [extracharge_did] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [extracharge_fee] => Array
a2billing.php|1: (
a2billing.php|1: [0] =>
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [dialcommand_param] => |60|HRrL(%timeout%:61000:30000)
a2billing.php|1: [dialcommand_param_sipiax_friend] => |60|HL(3600000:61000:30000)
a2billing.php|1: [switchdialcommand] =>
a2billing.php|1: [failover_recursive_limit] => 2
a2billing.php|1: [maxtime_tocall_negatif_free_route] => 5400
a2billing.php|1: [send_reminder] =>
a2billing.php|1: [record_call] =>
a2billing.php|1: [monitor_formatfile] => gsm
a2billing.php|1: [agi_force_currency] =>
a2billing.php|1: [currency_association] => Array
a2billing.php|1: (
a2billing.php|1: [0] => usd:dollars
a2billing.php|1: [1] => mxn:pesos
a2billing.php|1: [2] => eur:euros
a2billing.php|1: [3] => all:credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [file_conf_enter_destination] => prepaid-enter-dest
a2billing.php|1: [file_conf_enter_menulang] => prepaid-menulang2
a2billing.php|1: [callback_bill_1stleg_ifcall_notconnected] => 1
a2billing.php|1: [logger_enable] => 1
a2billing.php|1: [log_file] => /tmp/a2billing.log
a2billing.php|1: [currency_association_internal] => Array
a2billing.php|1: (
a2billing.php|1: [usd] => dollars
a2billing.php|1: [mxn] => pesos
a2billing.php|1: [eur] => euros
a2billing.php|1: [all] => credit
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: [ivr_voucher_prefixe] => 8
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: file:a2billing.php - line:75 - IDCONFIG : 1
a2billing.php|1: file:a2billing.php - line:76 - MODE : standard
a2billing.php|1: file:a2billing.php - line:88 - AGI Request:
a2billing.php|1: file:a2billing.php - line:89 - Array
a2billing.php|1: (
a2billing.php|1: [agi_request] => a2billing.php
a2billing.php|1: [agi_channel] => IAX2/4069575193-4
a2billing.php|1: [agi_language] => en
a2billing.php|1: [agi_type] => IAX2
a2billing.php|1: [agi_uniqueid] => 1192218606.39
a2billing.php|1: [agi_callerid] => 420625109662757
a2billing.php|1: [agi_calleridname] => unknown
a2billing.php|1: [agi_callingpres] => 1
a2billing.php|1: [agi_callingani2] => 0
a2billing.php|1: [agi_callington] => 0
a2billing.php|1: [agi_callingtns] => 0
a2billing.php|1: [agi_dnid] => 11541148645784
a2billing.php|1: [agi_rdnis] => unknown
a2billing.php|1: [agi_context] => a2billing
a2billing.php|1: [agi_extension] => 11541148645784
a2billing.php|1: [agi_priority] => 3
a2billing.php|1: [agi_enhanced] => 0.0
a2billing.php|1: [agi_accountcode] => 4069575193
a2billing.php|1: )
a2billing.php|1:
a2billing.php|1: file:Class.A2Billing.php - line:601 - get_agi_request_parameter = 420625109662757 ; IAX2/4069575193-4 ; 1192218606.39 ; 4069575193 ; 11541148645784
a2billing.php|1: file:a2billing.php - line:138 - [ANSWER CALL]
a2billing.php|1: file:Class.A2Billing.php - line:568 - FORCE LANGUAGE : ES
-- AGI Script a2billing.php completed, returning 0
-- Executing [11541148645784@a2billing:4] Wait("IAX2/4069575193-4", "2") in new stack
-- Executing [11541148645784@a2billing:5] Hangup("IAX2/4069575193-4", "") in new stack
== Spawn extension (a2billing, 11541148645784, 5) exited non-zero on 'IAX2/4069575193-4'
-- Hungup 'IAX2/4069575193-4'
vfon2*CLI>

Si esta llamando: -

Imagen de RazaMetaL

Si esta llamando:


- Executing [11541148645784@a2billing:4] Wait("IAX2/4069575193-4", "2") in new stack
-- Executing [11541148645784@a2billing:5] Hangup("IAX2/4069575193-4", "") in new stack

Tu sip_friend esta marcando 11541148645784 .

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

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({});

Páginas