Professional Documents
Culture Documents
Arezqui Belaid
areski @NOSPAM gmail.com
The Asterisk A2Billing Calling-Card-Platform Documentation by Arezqui Belaid Copyright 2005 Copyright @ 2005 The Asterisk Calling Card platform A guide to the basics of using A2Billing
This document may be distributed subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/ )
Table of Contents
1. Introduction .......................................................................................................................1 General concept of the calling card platform ...........................................................1 AreskiCC, is it the same ?............................................................................................1 Prerequisite knowledge and skills .............................................................................1 What to expect ? ...........................................................................................................1 Key Solution Features..................................................................................................2 How does it work (briey)..........................................................................................3 Licence ...........................................................................................................................4 2. Preparing your system for A2Billing ............................................................................5 Choose an Operating System / Distribution ...........................................................5 Install Asterisk & have it up running........................................................................5 Get Asterisk from precompiled Binary Packages ..........................................5 Get Asterisk from sources & compile ..............................................................5 Link for Asterisk installation ............................................................................6 Linux Requirements.....................................................................................................6 Required Packages..............................................................................................6 Verify the server installation .............................................................................6 Conclusion.....................................................................................................................8 3. Getting & Installing A2Billing ....................................................................................11 Getting the tarball ......................................................................................................11 Create the applications database - Postgres ..........................................................11 Create A2Billing system/database user........................................................11 Create the database and populate it with the sql dump - postgresql .......11 Create the applications database - Mysql ..............................................................12 Create A2Billing system/database user........................................................12 Create the database and populate it with the sql dump - mysql...............13 Install the le for the a2billing conguration.........................................................13 Install the le for the currencies table .....................................................................14 Install the php web management interface ............................................................15 Install management interface..........................................................................15 Congure & customize the Interface : a2billing.conf ..................................15 Files / directory right.......................................................................................16 SIP/IAX friends include ..................................................................................17 Congure the manager ....................................................................................17 Congure MusicOnHold.................................................................................17 Give a try! ..........................................................................................................18 Increase security of the Admin interface with an htaccess.........................18 Install the customer web interface ...........................................................................18 Install customer web interface ........................................................................18 Install The AGI components : IVR CallingCard application ...............................18 Install ..................................................................................................................19 Install Sounds les............................................................................................19 Congure & customize the AGI : a2billing.conf ..........................................19 Congure extensions to run A2Billing into Asterisk ..................................21 4. Specic information for Installation according to the distribution......................23 RedHat .........................................................................................................................23 Files Locations differences...............................................................................23 Commands Syntax differences .......................................................................23 Fedora ..........................................................................................................................23 Debian ..........................................................................................................................23 Ubuntu .........................................................................................................................23 CentOS .........................................................................................................................23 Mandriva .....................................................................................................................23 Suse...............................................................................................................................23 Dos 5.0..........................................................................................................................23 Windows 3.11..............................................................................................................23 iii
Xbox..............................................................................................................................23 5. User Guideline ................................................................................................................25 Entities interaction in the callingcard platform .....................................................25 Create customer/card................................................................................................26 Card properties .................................................................................................26 CallerID Authentication ..................................................................................27 Billing Engine..............................................................................................................27 Introduction.......................................................................................................27 TariffGroup ........................................................................................................28 Ratecard .............................................................................................................28 Rate .....................................................................................................................28 Trunk ..................................................................................................................28 Import Ratecard ................................................................................................28 SIP/IAX Friends .........................................................................................................28 Make card recharge & notify payment....................................................................29 Reporting tools ...........................................................................................................29 cdr report ...........................................................................................................29 calls compare .....................................................................................................29 monthly trafc...................................................................................................29 daily load ...........................................................................................................29 Invoice ................................................................................................................29 Edit/Add administrator (& dene ACL) ...............................................................29 Customer web interface ............................................................................................29 6. Contribution ....................................................................................................................31 Code contribution ......................................................................................................31 Development Donation .............................................................................................31 Audio les & Translations.........................................................................................31 Bounty..........................................................................................................................31 Feedback & success story ..........................................................................................31 7. Conclusion .......................................................................................................................33 Conclusion...................................................................................................................33 8. FAQ (Frequent Asked Question) .................................................................................35 FAQ installation..........................................................................................................35 FAQ Utilization...........................................................................................................35
iv
Chapter 1. Introduction
General concept of the calling card platform
The phone cards are a well-known product in telecommunication sector, which can be employed from any country where a number of access is available. The phone calling card is a printed card containing the access information and the information of account to make international as well as national calls. The Card carry a limit on the maximum use and are normally sold by on Internet or in the street distribution. Today the Calling Cards is one of the top business in the VoIP Industry and A2Billing with Asterisk is trying to complete the needs for large, medium-sized companies and start-up who appreciate the Calling Cards business model. A2Billing allows to craft a calling card management system over your Asterisk Server. Its powerful calling card platform can be easily deployed with Asterisk, it is providing wide set of tools to manage a complex & advanced calling card system! With A2Billing & Asterisk, prepaid/postpaid calling card services are just as easy to implement as to make a few entries through a web interface. With its user-friendly, powerful functionality, A2Billing try to end to be the preferred billing software for Calling services. As Asterisk, the most valuable of A2Billing is the open source nature. The source are provided and the soft can be enhanced by the asterisk community or peoples that use it. This concept will ensure that the soft will grow up and continue to ll the billing needs of the asterisk users. This solution aims to manage all aspects of the calling card service and it takes care of the calling card service through real-time integration for card activation, authentication and debiting the account balance of users. The solution provides a Web interface for administrator to manage all the billing system and for customer to see their own call history, balances and user data.
Chapter 1. Introduction
What to expect ?
A2Billing is a complex software and it can take a little while to get use to. Its not yet well-documented (not at the moment I am writing this sentence), thats what we are trying to resolve with the aids of this handbook. We dont pretend A2billing is easy to install for someone with poor linux basics, so please before starting to ame over the mailing-list or the wiki (I saw there is always some expert to make public offense :D)
* What to expect ?
Once you will have install and after you will play a bit with, you will discover a exible billing software that is suitable for many different use, with a great rate-engine, reporting features, invoice generation, customer followup, etc...
the Cardnumber can also be dened as accountcode into sip.conf, iax.conf, etc..
* * Announce the maximal call time for the given destination number
It calculates the remaining duration of the actual call (based on tariffrate tables), informs the caller about this and sets a timeout
Warn the caller about the call interrupt X seconds before the call gets interrupted
* * After disconnecting the call AGI updates the credit and stores the concerning Call-Detail-Records with CallingPartyNumber, CalledPartyNumber, CallSetupTime, Duration, Charge and the remaining credit
* * Reporting
- Monthly & daily reporting - monthly trafc reports (pie graph) - Daily load compare call-load with previous days - criteria denition for reporting - export report to PDF & CSV - Generate Invoices to PDF format
* * Powerful rate-engine
- LCR & LCD management - Billing Increment - Progressive Rate - Scheduled Rates (days of the weeks) - Expiration rates - importation ratecard from csv le
Chapter 1. Introduction
* * IVR Customization - many options such as use DNID, Directcall, saybalance, ...
* * Internal help/info
* * Multi-language
* * callerID authentication
* * Voucher support
1. The administrator generates cards in series 2. The Serial/Cardnumber numbers can be exported for outsourced printing of cards 3. The customer call the asterisk server with a supported client or dials a local or toll-free access number provided to him or show on the card. 4. Asterisk answers the call and prompts the caller to enter his PIN number. 5. After validating the PIN through the VoIP billing server, Asterisk announces to the caller his account balance and invites him to dial a destination number. 6. Upon entering such number, Asterisk announces the amount of calling time available and connects the caller to the destination number according to the predened ratecards & trunks. 7. Upon call completion, Asterisk save advanced CDR information for the call that would be used for billing, reporting and invoice. 3
Chapter 1. Introduction
8. When the balance bottoms out, the service is disabled in real time and the customer must then recharge the account.
Licence
This software is released under GNU GPL license. The GNU GPL license can be found at : http://www.gnu.org/copyleft/gpl.html This code is distributed WITHOUT ANY WARRANTY OF ANY KIND.
Linux Linux
: :
http://voip-info.org/tikihttp://voip-info.org/tikiMacOS X :
or
http://voip-info.org/tikihttp://voip-info.org/tikihttp://voip-info.org/tikihttp://voip-info.org/tiki-
Linux Requirements
Required Packages
# Apache # PHP # POSTGRESQL or Mysql # use phpagi 2.14 included (http://phpagi.sourceforge.net) # need GD library # jpgraph_lib (included)
Check httpd status if its install already ### /etc/init.d/httpd status (On RedHat Linux 9 & Fedora) Normally, you should get something like this 6
Chapter 2. Preparing your system for A2Billing ### httpd (pid 7486 3710 3709 3708 3707 3706 3705 3704 3703 3700) is running... if you see that its not running### /etc/init.d/httpd start
Starting httpd: [ OK ]
To enable apache server permanently to start after reboot, please check chkcong or something similar if you are running another distro: if you dont check your apache conguration. PHP check if its install
#### rpm -qa | grep php
PHP Requirements are : php, php-pgsql or php-mysql, perhaps php-gd (if its a recent distro). If one of those are missing you will have to install it, see YUM or apt-get or by getting the appropriate packages. CentOS & Debian will probably request a little change in the php.ini (vi /etc/php.ini) you will have to add the following line where extension are dened. extension=pgsql.so (dont forget to reload apache after changes)
To install postgresql, if there are well congured, you can use YUM or APT-GET, if not you will have to nd the appropriate packages and install it. apt-get install postgresql postgresql-server or for CentOS apt-get install rhdb Check postgresql status (On RedHat):
/etc/init.d/postgresql status Or service postgresql status Or with CentOS /etc/init.d/rhdb status
To enable postgresql server permanently to start after reboot, please check chkcong (chkcong postgresql --level 2345 on) 7
To install mysql, if there are well congured, you can use YUM or APT-GET, if not you will have to nd the appropriate packages and install it.
apt-get install mysql mysql-server
To enable postgresql server permanently to start after reboot, please check chkcong (chkcong postgresql --level 2345 on)
Remember the hosts were your postgresql and Apache are must trust each other or at least open this port if there is a rewall between your database and your web server.
/etc/init.d/postgresql restart Or service postgresql restart Or with CentOS /etc/init.d/rhdb restart Stopping postgresql service: [ OK ] Starting postgresql service: [ OK ]
Conclusion
You should have a fully installed Linux distribution working with Asterisk. The next chapter will deal with obtaining and installation A2Billing.
10
create the postgres user, we use a username a2billinguser but you can use whatever you want
createuser -W a2billinguser You will be asked if the user can create databases, answer yes You will be asked if the user can create other users, answer no Use whatever password you want
Create the database and populate it with the sql dump postgresql
Create a2billing database
createdb -O a2billinguser a2billing (that is an O for Owner)
11
it will ask you for password then input the password you set before this step. This will create all the table with the a2billinguser as Owner.
* Lets verify database installation psql -d a2billing -U a2billinguser -W
a2billing=> SELECT * FROM ui_authen; userid | login | password | groupid | perms | confaddcust | name | direction | zipcod --------+-------+------------+---------+-------+-------------+------+-----------+-----2 | admin | mypassword | 0 | 1023 | | | | | 1 | root | myroot | 0 | 1023 | | | | | (2 rows)
If you got the above, congratulations, you have installed correctly the postgresql database (that was the most difcult part). If you didnt, take a break, drop the database and start over. To resume what we need :
Postgres must be running. Postgres must trust local connections from the user a2billinguser on the database a2billing using a supported auth method(pg_hba.conf). Postgres must allow tcpip connections on port 5432 (postgresql.conf, rewall). The a2billing database must be owned by the applications user ( in our case, the user a2billinguser).
12
Chapter 3. Getting & Installing A2Billing create the mysql user, we use a username a2billinguser but you can use whatever you want SQL queries to create the new mysql user :
GRANT ALL PRIVILEGES ON *.* TO a2billinguser2@% IDENTIFIED BY a2billing WITH GRAN GRANT ALL PRIVILEGES ON *.* TO a2billinguser2@localhost IDENTIFIED BY a2billing W GRANT ALL PRIVILEGES ON *.* TO a2billinguser2@localhost.localdomain IDENTIFIED BY \q (to quit)
More information about "Adding new user accounts to MySQL" can be found : http://dev.mysql.com/doc/refman/4.1/en/adding-users.html
Create the database and populate it with the sql dump - mysql
Create a2billing database
mysqladmin create mya2billing -u a2billinguser -p
(prompt will ask you for password, in our case enter a2billing) Import data schema into new database
(it will ask you for password then input the password you set before this step. This will create all the table with the a2billinguser as Owner.) Lets verify database installation
mysql mya2billing -u a2billinguser -p
(prompt will ask you for password, in our case enter a2billing)
mysql> SELECT * FROM ui_authen; +--------+-------+------------+---------+-------+-------------+------+-----------+----| userid | login | password | groupid | perms | confaddcust | name | direction | zipc +--------+-------+------------+---------+-------+-------------+------+-----------+----| 2 | admin | mypassword | 0 | 1023 | NULL | NULL | NULL | NULL | 1 | root | myroot | 0 | 1023 | NULL | NULL | NULL | NULL +--------+-------+------------+---------+-------+-------------+------+-----------+----2 rows in set (0.00 sec)
If you got the above, congratulations, you have installed correctly the mysql database. If you didnt, take a break, drop the database and start over.
13
Chapter 3. Getting & Installing A2Billing This le contains all the conguration information for the A2Billing platform : Database connection parameters, AGI behaviour, Web interface Custom, etc... First, lets start by setup the database access. vi /etc/asterisk/a2billing.conf This le contains different section to congure the several part of the application :
section [database] : To congure the database connection section [webui] : To customize the web user interface section [recprocess] : conguration for the Reccurring process (cront job) section [agi-confX] : conguration for the AGI, several congurations can be dened, ie "agi-conf1", "agi-conf2", etc... the groupid parameter will dene which conguration to use. Usage : DeadAGI(a2billing.php|%groupid%) by default agiconf1 is used
First lets congure the database connection in the section [database], for this we have to change the username=a2billing,database=a2billing and password="yoursecretpassword"
[database] hostname=localhost port=5432 user=a2billinguser password=a2billing dbname=mya2billing dbtype=postgres
* HOST: This is the Database host name. Example: localhost * PORT: Database port. Example: 5432 * USER: Username to access to the database. Example: a2billinguser * PASS: Database password of the user. Example: password * DBNAME: Name of the Database. Example: a2billing * DB_TYPE: Database type. support: postgres (mysql is also supported)
This le contains all the currencies information for the A2Billing platform This le can be automatically updated by a cront process. Please read the future section "Cront -> Currencies table update" to know how to congure your system to update this rates.inc automatically. File sample of rates.inc:
$currencies_list[USD][1]="US Dollar"; $currencies_list[USD][2]="1.0000"; $currencies_list[EUR][1]="Euro";
14
For you information you can check the apache DocumentRoot in the httpd.conf le
# DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. DocumentRoot "/var/www/html"
; configuration for the Web interface [webui] ; Path to store the asterisk configuration files buddyfilepath = /etc/asterisk/
; Email of the admin (not used yet) email_admin = info@areski.net ; Card lenght len_cardnumber = 10
;amount of MOH class you have created in musiconhold.conf : acc_1, acc_2... acc_10 clas num_musiconhold_class = 10
;MANAGER CONNECTION PARAMETERS manager_host = localhost manager_username = myasterisk manager_secret = mycode ; Allow to display the help section inside the admin interface (YES - NO)
15
; the file type extensions allowed to be uploaded for the musiconhold such as "gsm, mp3 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 :>
; 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"
until the number you set in the a2billing.conf for the parameter NUM_MUSICONHOLD_CLASS, if 10 you will have to create 10 directory set writing rights for the web interface
chmod 777 /var/lib/asterisk/mohmp3/acc_*
16
Chapter 3. Getting & Installing A2Billing the following directory "a2billing" is not used yet... but we will in the near future to congure automaticaly some audio les.
mkdir /var/lib/asterisk/sounds/a2billing chmod 777 /var/lib/asterisk/sounds/a2billing
Congure MusicOnHold
Edit the MusicOnHold conguration les, vi /etc/asterisk/manager.conf Add the following at the end, we are going here until acc_10, but you must dene as many directory that you have create previously
; class definitions For A2Billing 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
17
Give a try!
Point your browser to http://hostname/a2billing From this point, you should be able to login to the webpage Try log in with login=root, pass=myroot or login=admin, pass=mypassword Dont forget to change later your root and admin password.
The customer web interface will use the le a2billing.conf to know the database parameter. Refer to the previous section "Install the le for the a2billing conguration" to know how to dene those database connection.
18
*Note you will be asked if you want to overwrite, answer yes For other language:
# install A2Billing Spanish Audio into /var/lib/asterisk/sounds/es/ # install A2Billing French Audio into /var/lib/asterisk/sounds/fr/
Dont forget to get the appropriate asterisk audio les to play the balance, time to call, other... To get the international asterisk audio les, you can nd those available through the link: http://voip-info.org/tiki-index.php?page=Asterisk+sound+les+international
; 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=/tmp/a2billing.log
19
; if YES Use Set(LANGUAGE()=fr) instead, for me it didnt work from AGI ; ### if (SETLANGUAGE_DEPRECATE==YES) $myres = $agi->agi_exec("EXEC Set(LANGUAGE()=$la setlanguage_deprecate=YES ; 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 espaol, Pressez 3 pour Franais 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=EN
; Introduction prompt : to specify an additional prompt to play at the beginning of the ; parlezplus-intro_013centimes intro_prompt= ; lenght of the cardnumber (amount of digits) len_cardnumber=10
; Voucher lenght len_voucher = 15 ; this is the minimum amount of credit to use the application min_credit_2call=0 ; if YES it will catch the DNID and try to dial it out directly without asking for the ; value : YES, NO use_dnid=NO ; 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 time the user can call (values : yes - no) say_timetocall=YES ; enable the callerid authentication ; if this option is active the CC system will check the CID of caller cid_enable=YES
; if the cid doesnt exist you can then ask a cardnumber to the calling party in order t cid_askpincode_ifnot_callerid=YES
; if the callerID, this option will allow the system to add it automatically and create cid_auto_create_card=NO
; If cid_auto_create_card has been set to YES, the following option will define with wh ; ; billing type of the new card ; ( value : POSTPAY or PREPAY)
20
; the tariffgroup to use for the new card (this is the ID that you can find on the admi cid_auto_create_card_tariffgroup=6 ; 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 ; 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 sip_iax_pstn_direct_call=NO
; 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 ; 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 ; %timeout% tag is replaced by the calculated timeout according the credit & desti dialcommand_param="|30|HL(%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 suppor ; So in case of troubles, try it out switchdialcommand=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
; the debug shell (ONLY FOR THE DEVELOPERS) ; 0=no, 1=yes debugshell=0
21
If you use AMP, process as bellow (Can anybody conrm the following, this info is from the wiki and I dont use AMP to check it by myself) Edit extension_custom.conf (/etc/asterisk/extension_custom.conf) and then add the following under the from-internal-custom context.
; CallingCard application exten => _X.,1,Answer exten => _X.,2,Wait,2 exten => _X.,3,DeadAGI,a2billing.php exten => _X.,4,Wait,2 exten => _X.,5,Hangup
You can replace above the _X. by a number if you want to set the application over a specic extension. Reload Asterisk to apply the changes
> Run asterisk -r CLI>reload CLI>exit
Try to make a call then into your pbx and you should hear "please enter your pin number...". This should end up with the agi-php installation !
22
RedHat
Files Locations differences
Fedora
Debian
Ubuntu
CentOS
Mandriva
Suse
Dos 5.0
Windows 3.11
Xbox
23
24
The graph above illustrates how the main entities interact together.
1. Call is initiated on the Asterisk PBX platform 2. Authentication is perform through various ways : Cardnumber, CallerID, SIP/IAX Friends with Accountcode 25
3. The 3D cubes purpose is to make this graph a little bit more appealing. 4. Cards have different properties but the main is the tariffgroup to which it is linked. The TariffGroup will determine how the billing will be processed. 5. TariffGroup can have 1 or + ratecard. Ratecard contains all the couple (destination, tariff), it will be fed with all the destination you would like to provide a termination. 6. The main rule for the TariffGroup is how it will decide which rates if there is different ratecard. LCR/LCD properties can be dened and then the rate engine would be able to determine which termination would be the most appropriate.
Create customer/card
Card are the main element of the CC software, as they might contain all the info about the customers (name, email, phone, ..) we can said somehow that the card represent simply the customer of your system.
Card properties
Lets try to make an non-exhausting list of the card properties.
cardnumber : this is the pin number of the card :D cardalias : this is an alias of the card, it should be number and this will be use by the user to connect as username into the customer web interface. It will be also use to call sip/iax friends. webui pass : password of the user to connect on the customer web UI. credit : this is the amount of money left on this card. it can be negative in PostPay use. language : the preferred language of the card holder tariffgroup : TariffGroup to apply on this card activated : determine if this card is active or no. simultaneous access : Dene if more that one call can be accept at the same time on this card currency: the currency that will use to play the balance and provide billing information to the customers runservice : set if the recurring service would be apply over this card card type : dene the billing method (Prepaid or Postpaid) to apply on this card. credit limit : when postpaid method is selected. A credit limit need to be specify. rst use date : Date when the rst call has been make on this card enable expire : Dene how you want to enable the expire of the card (date, amount of days since rst use, amount of days since creation). expiration date: Dene the date for the expiration, it works only if "enable expire" is set to "date expire" expiration days : Dene the numbers of days for the expiration if if "enable expire" is set to "amount of days since rst use" or "amount of days since creation" the followings are information about the card holder : last name, rst name, email, adresse, city, state/province, country, zip/postal code, phonenumber, faxnumber inuse : when a caller is calling on a card, the system set an increment ag to know if this card is currently used or not. If the system stop in abnormally way, it can
26
Chapter 5. User Guideline happen that some customer wont be able to use their cardnumber again. In that case, it can be useful to reset the ag to 0.
callerid : this option specify the CallerID list attached to this card, several callerId can be specify.
CallerID Authentication
The CallerID Authentication is well-know in the callingcard business. This allow to a third part to use your service without having to authenticate each time. Most of common integration would follow the next schema :
1) link one or more callerID to the Card 2) enable the callerId authentication in the AGI application. edit the a2billing.conf, "cid_enable=YES" 3) if the callerID is not recognized by the system, we can still proceed to the cardnumber authentication but for this we need to set the appropriate option : "cid_askpincode_ifnot_callerid=YES" (see a2billing.conf)
we have also to possibility to create a card each time a new callerID is found. if you want to realize this we would advice you to look at the following option in a2billing.conf : cid_auto_create_card ; cid_auto_create_card_typepaid ; cid_auto_create_card_credit ; cid_auto_create_card_credit_limit ; cid_auto_create_card_tariffgroup
Billing Engine
Introduction
Talk here about General notion of the rate-engine : Ratecard, LCR, LCD, etc... a bit also about your life and your rst girl-experience...
TariffGroup
bla bla bla about tariffgroup
Ratecard
bla bla bla about Ratecard... SORRY, dont have much time now...
Rate
bla bla bla about rate... SORRY, dont have much time now...
Trunk
Haaaa there is so much to say about trunk... but not today :D
Import Ratecard
nothing here also... well it would be nice if you can help :D (some screenshot and explanation would be great here)
SIP/IAX Friends
With this callingcard platform we can also dene Asterisk user (SIP/IAX Friends), in other words we can pre-congure a SIP client, an ATA phone or even a gateways. We will not go in details with all the parameters that dene a SIP/IAX friends, we will refer a well-documented pages of the WIKI :
As you probably discover, when you browse the card you have 2 particulars button at your disposal : SIP & IAX. When you click on one of them, you will see that an instance in SIP/IAX Friends has been created and 2 red buttons will appears asking you to generate the conguration les. If your system as been well congured you should have an include of the a2billing sip/iax les into your sip/iax.conf les, this will allow us to generate after each changes the specic a2billing sip/iax les and reload asterisk at your convenience to add/update or remove some Asterisk friend/user. Standard process should be:
1# Create Card 2# Create a SIP/IAX Friend 3# Adapte SIP/IAX conguration according to your user 4# Reload Asterisk (it can be perform from the web interface)
28
Reporting tools
cdr report
calls compare
monthly trafc
daily load
Invoice
29
30
Chapter 6. Contribution
This chapter aims to give information for those that would appreciate to make any kind of contribution.
Code contribution
We have discovered during the last month of the creation of the v1 A2billing that couples of developers have bring several effort to customize or enhance AreskiCC to their convenience. What a desolation that we cannot all share and take prot of your effort... I will strongly invite you to share you work and your experience even if you think that this is really specic, most of the time we can nd some way to make it generic. This will be at your advantage as you will have your work already added for the future release.
Development Donation
Who dont want some $$$ to cover his long hard-working nights? Denitely not me :D If you like this project and you want to support it to ensure him a good follow-up and future enhancements, we will denitely appreciate donation. Author paypal account : info [alt] areski [dot] net
Bounty
If you need some enhancement or some specic news features, we can certainly create a bounty to complete your needs and by the way push forward the implementation those features.
31
Chapter 6. Contribution
32
Chapter 7. Conclusion
Conclusion
Little note about the project: it has been started in July 2004, it was a personal project with at the beginning the only goal to make something useful for the Asterisk Community. The goals - I had at the starting point - have changed quickly during the cycle of the development, due to the request and better understanding of the needs of an Asterisk Billing System. Goal we hope to complete in short terms (within the next months):
Resellers support Paypal API addition Internationalization More languages support Easy-install module
Asterisk C module PL/SQL function for mysql 4.x (increase performance for both DBM) and much more...
We still have lot lot to do, the todolist doesnt stop to grow... and I really hope that soon we will be able WITH YOUR HELP to provide one of the best billing solution ever :D
33
Chapter 7. Conclusion
34
FAQ installation
#Question 1 : Answer :
#Question 2 : Answer :
FAQ Utilization
#Question 1 : Answer :
#Question 2 : Answer :
35
36