Vous êtes sur la page 1sur 4

Asterisk Integration Manual

(for Asterisk 1.4 or newer)

Copyright 2006-2008 JeraSoft Development


http://jerasoft.net/

1. Description
To be able to collect the calls data from Asterisk you can go two ways:
collect the data via the CDR-files or via the RADIUS-server. The differences in
these methods are the following:

CDR-files import
Advantages: high reliability and stability, no calls information
may be lost due to server or client side;
Disadvantages: the data is received with delays because files
are copying at the defined periods of time.

RADIUS-server
Advantages: data is received in real-time mode (the call packet
is sent right after the end of the call), call authorization procedure is
possible;

Disadvantages: when network or server hardware is unstable,


the loss of data is possible (although, this data can be restored later
with CDR-files).

Of course, if hardware posseses enough capacity, you can combine both


methods.
Important notice: only Asterisk 1.4 or newer is supported by
BillBery.

2. Integration via CDR-files


2.1. BillBery settings
To allow the billing system collect the data from Asterisk via CDR-files,
you need to do the following:
1) Create Asterisk gateway within BillBery (go to VoIP Gateways
section of User Manual) and enable Files Collector. In gateway's
parameters you must define:
- IP: Asterisk server IP adress;
- Collector Type: CDR/ Asterisk (>=1.4);
- After Parse: define the desired method of collected files processing;
2) Enable the files autodownloader under Files Downloader and specify
appropriate paths:
- /var/log/asterisk/cdr-billing/*.csv for downloading (From path
field);
- /var/log/asterisk/cdr-billing/history/ - for processed files (Move to
field).

3) Make sure, that Task Scheduler section has File Collector process
enabled.

2.2. Asterisk settings


First thing you need to do, is to create SSH-keys on Asterisk server with
next set of commands:
cd /usr/local/billbery/bin
su billbery
./ssh_keys.py root@Asterisk_server_IP

Next,
copy
a
file
from
BillBery
server
from
path
<billbery>/share/extra/tools/asterisk-cdr-rotate.sh into /usr/bin/ folder on
Asterisk server, and setup it in etc/crontab/ as:
0 * * * * root /usr/bin/asterisk-cdr-rotate.sh

i.e. - to be executed hourly.


Open /etc/asterisk/cdr.conf file on Asterisk server and make sure that
following lines are present:
[csv]
usegmtime=yes

; log date/time in GMT. Default is "no"

loguniqueid=yes ; log uniqueid. Default is "no"


loguserfield=yes ; log user field. Default is "no"

3. Integration via RADIUS


3.1. BillBery settings
To allow the billing system collect the data from Asterisk via RADIUSprotocol, you need to do the following:
1) Create Asterisk gateway within BillBery (go to VoIP Gateways section
of User Manual) and enable RADIUS Server collector. In gateway's
parameters you must define:
- IP: Asterisk server IP adress;
- Radius Server collector type: RADIUS / Asterisk (>=1.4);
- Secret: random password, that is equal to the password specified in
Asterisk configuration file.

2) Make sure that Task Scheduler section has RADIUS Server process
enabled.
3) Make sure that System Status section has RADIUS Server process
running, and if not start it.

3.2. Asterisk settings


3.2.1. RADIUS accounting and authorization

Configure RADIUS on Asterisk server in accordance to Asterisk technical


manuals.

Vous aimerez peut-être aussi