Вы находитесь на странице: 1из 5

IP-

A2Billing
Asterisk


, VoIP-,
.
A2Billing , .

A2Billing?
.
AsteriskNOW,
Digium ,

. , ,
, , .
Asterisk
, ,
.
, , , . .
A2Billing AstBill [5].
A2Billing -

64

, AstBill.
,

. . GNU GPL,
Apache, MySQL Drupal
- , . :
n SIP- IAX ,
;
n
, ;

n , ;

n , ,
, ;
n

email;
n
-.

VoIP-. , ,
.

A2Billing
A2Billing [1] GNU GPL
-

IP-
, . VoIP- ,
IP TDM.
: , , . ,
PIN.
A2Billing:
n IVR (Interactive Voice Response)
Caller ID
Card Number,
, (,
.), ;
n - ,
, VoIP-, ,

DID (Direct Inward Dialing) ,
, , ,
,
callback, ;
n -
, , , ,
DID, .

1. AsteriskNOW

, , A2Billing PHP,

.

A2Billing
A2Billing Asterisk
FreePBX -
Apache, MySQL PostgreSQL.
- PHP,
PHP php-pgsql php-mysql, GD
php-pcntl. PHP ,
PHP4, PHP5,

.

1, 2008

2. Astbill


, php -m,
.
RedHat
RPM:
# rpm -qa | grep php

pcntl
php5cli. PHP php.ini. , MySQL :

Ubuntu Debian:

extension=mysqli.so

$ sudo dpkg l php*

GD:

65

IP-
extension=gd.so

, A2Billing MySQL. :
$ mysqladmin create mya2billing -u a2billinguser -p

,
:
$ mysql u root p
mysql> GRANT ALL PRIVILEGES ON mya2billing.*

TO 'a2billinguser'@'%' IDENTIFIED BY 'password'

WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON mya2billing.*

TO 'a2billinguser'@'localhost'

IDENTIFIED BY ' password' WITH GRANT OPTION;

mysql>GRANT ALL PRIVILEGES ON mya2billing.*



TO 'a2billinguser'@'localhost.localdomain'

IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)

mysql> quit

password , , .
. . :
$ mkdir a2billing
$ cd a2billing
$ tar xzvf A2Billing_1.3.1.tar.gz

. , . Database PostgreSQL MySQL.


MySQL
MySQL 3.x 5.x.
.
$ cd Database/mysql/Mysql-5.x/
$ mysql mya2billing

-u a2billinguser

-p < a2billing-mysql-schema-

MYSQL.5.X-v1.3.0.sql

, :
$ mysql mya2billing

-u a2billinguser p
mysql> SELECT * FROM cc_ui_authen;

, ( ).
3. A2Billing


A2billing
A2billing a2billing.conf, . /etc/asterisk:
$ sudo cp v a2billing.conf

/etc/asterisk

4. A2Billing

66

.

:
n database ;
n global , , ,
,
,
;

IP-
n callback callback, ,

my_max_file_size_audio=3072000 ;
;
;
n vwebcustomerui - file_ext_allow = gsm, mp3, wav
, (file_ext_allow_musiconhold = mp3
, , , ,
e-mail );
. , , .
n webui - , API, Asterisk;
Asterisk
n sip-iax-info SIP IAX;
, n epayment_method :
(, ) /$ sudo mkdir /var/lib/asterisk/mohmp3/
;
n backup .
MOH, /var/lib/
. - asterisk/mohmp3. MOH /etc/
database - asterisk/musiconhold.conf [2]:
. $ sudo mkdir /var/lib/asterisk/sounds/a2billing
, :
$ sudo chmod 777 /var/lib/asterisk/sounds/a2billing

$ sudo vi /etc/asterisk/a2billing.conf
[database]
hostname = localhost
port = 5432
user = a2billinguser
password = password
dbname = mya2billing
;dbtype = postgres
dbtype = mysql
[global]
; ,
; .
; cc_curencies. :
; | id | currency | name
| value
|
; | 112 | RUB
| Russian Rouble (RUB) | 0.03563 |
; |lastupdate
| basecurrency |
; |2008-01-22 21:02:59 | USD
|
;
; finance.yahoo.com
base_currency = usd
; , ,
; JPEG- templates/default/images/
invoice_image = asterisk.jpg
;
admin_email = admin@server.com
; /etc/asterisk/manager.conf
manager_host = localhost
manager_username = myasterisk
manager_secret = mypassword
[webui]
;
currency_choose = usd, eur, rub ; all
; , SIP
; IAX A2Billing
buddy_sip_file = /etc/asterisk/additional_a2billing_sip.conf
buddy_iax_file = /etc/asterisk/additional_a2billing_iax.conf
; MOH (Music on Hold)
dir_store_mohmp3 = /var/lib/asterisk/mohmp3
; MOH classes musiconhold.conf
num_musiconhold_class = 10
; help (YES - NO)
show_help = YES
; ,
; upload_max_filesize Ubuntu,
; 2
my_max_file_size_import = 1024000
; 1 M
; MOH
dir_store_audio = /var/lib/asterisk/sounds/a2billing

1, 2008

A2Billing,
Asterisk:
$ sudo chmod 777 /etc/asterisk

. , . lsal
, root
root. Asterisk root. , - root, . ,
Asterisk [6],
asterisk, sterisk,
-.
, A2Billing,
,
buddy_sip_file buddy_iax_file, Asterisk,
.
sip.conf :
#include additional_a2billing_sip.conf

iax.conf:
#include additional_a2billing_iax.conf

,
777, A2Billing
. :
$
$
$
$

sudo
sudo
sudo
sudo

touch /etc/asterisk/additional_a2billing_sip.conf
chmod 777 /etc/asterisk/additional_a2billing_sip.conf
touch /etc/asterisk/additional_a2billing_iax.conf
chmod 777 /etc/asterisk/additional_a2billing_iax.conf

, , , .
Asterisk, .
/etc/asterisk/manager.conf , manager_username

67

IP-
CDR- Asterisk
Asterisk CDR (Call Detail Record).
(,
Caller ID, , , , ) CSV- /var/log/asterisk/cdr-csv.
, cdr/cdr_csv.c.

,
.
Trunk,
VoIP-.

, MOH,
,
, , .
- A2BCustomer_UI.
:

(${CDR(accountcode)}), AMA
(Automated Message Accounting) , . CDR- . SQLite, MySQL,
PostgreSQL, unixODBC, MS SQL, Sybase
.

.

manager_secret, ( [2]).
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[myasterisk]
secret = mypassword
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

-
.
.
A2Billing A2Billing_UI.
-. Ubuntu
:
$ sudo cp -rf A2Billing_UI /var/www

- :
$ cat /etc/apache2/apache2.conf | grep User
User www-data

$ sudo cp -rf A2BCustomer_UI /var/www


$ sudo chown R www-data /var/www/
$ sudo chmod 777 /var/www/A2BCustomer_UI/templates_c

A2Billing_AGI AGI (Asterisk


Gateway Interface)-.
, Asterisk:
$ cd A2Billing_AGI
$ sudo cp a2billing.php /var/lib/asterisk/agi-bin/

:
$ sudo chmod +x /var/lib/asterisk/agi-bin/a2billing.php
$ sudo cp -rf libs_a2billing /var/lib/asterisk/agi-bin/

Asterisk A2Billing, /etc/asterisk/extensions.conf:


[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

, A2Billing
. . , templates_c:
, ,
, A2Billing. A2Billing $ sudo chmod 777 /var/www/A2Billing_UI/templates_c
gettext, , ,
, http://IP-/ .
A2Billing_UI,
root myroot admin mypassword ( - [4].
cc_ui_authen, ). - 1. A2Billing http://trac.asterisk2billing.org/cgi-bin/trac.cgi.
htaccess.
2. . Asterisk: . // , 12,
: , 2007 . . 44 47.
CSV- SIP- IAX- . 3. Wiki http://wiki.asterisk2billing.org/
, index.php/User_guide.
,
4. A2Billing http://forum.asterisk2billing.org . , http://asteriskforum.ru.
Outbound CID, 5. AstBill http://astbill.com.
CID-. Billing - 6. Asterisk root http://www.voip-info.org/wiki/
,
index.php?page=Asterisk+non-root.
$ sudo chown R www-data /var/www/A2Billing_UI

68

Вам также может понравиться