Billing
The billing feature allows you to properly bill and collect money (or cross-charge)
for the use of your PBX system and its telephone services. Billing accounting allows
you to bill based on the number called and the amount of service time. In addition,
billing accounting allows the customer to know not only the amount that is owed
but the big-three variables (who, where, and how-long) of each service call made.
Billing Accounting with Asterisk PBX System
By default Asterisk PBX generates a Call Detail Record (CDR) for each call and is
configured to store call details into a Comma Separated Values (CSV) file.This file is
located in the /var/log/asterisk/cdr-csv directory on the Asterisk PBX system.The
CDR accounting file name is Master.csv. Table 2.2 lists fields stored in the CDR
filename.
Table 2.2 Billing Fields and Functions Recorded
Field Function
Accouncode Manually assigned account code tag per extension or
channel (string 20 chars)
Src Caller ID number (string 80 char)
Dst Destination number (string 80 char)
Cdcontext Destination context (string 80 char)
Clid Caller ID with text (80 char)
Channel Channel used (80 char)
Dstchannel Destination channel if appropriate (80 char)
Lastapp Last application if appropriate (80 char)
Lastdata Last application data (arguments) (80 char)
Table 2.2 continued Billing Fields and Functions Recorded
Field Function
Start Start of phone call (date/time)
Answer Answer of phone call (date/time)
End End of phone call (date/time)
Duration Duration of phone call from dial to hang-up in seconds
(integer)
Billsec Duration of phone call from answer to hang-up in seconds
(integer)
Disposition What happened to the call dialed (e.g., busy, failed,
answered)
Amaflags What flags to use (e.g., billing, ignore) specified on perchannel
basis
User field User-defined field (255 chars)
Uniqueid Unique channel identifier (32 chars)
Figure 2.7 displays a sample Master.csv file in Microsoft Excel using some of the
CDR values that were defined in the previous table.You can modify the format of
the CDR file and its fields to fit your needs.With this file in hand, you can query
for a specific extension and the relative phone services records.You can find out
who is spending the most time on the phone by looking up source and duration
fields. Further you can find out which number is called most often by querying the
destination fields. Accounting information in the Master.csv file allows you to create
invoices for paying subscribers.
CSV file formats can be easily converted and imported into common databases.
Many billing applications can then interconnect with these databases and create prepaid
and postpaid billing solutions. Some supported CDR storage methods and
databases include:
■ Asterisk CDR records to text file with comma separated values
■ Asterisk CDR records to SQLite database
■ Asterisk CDR records to PostgreSQL database
■ Asterisk CDR records to unixODBC supported databases
■ Asterisk CDR records to MySQL
■ Asterisk CDR records to Sybase
Prepaid and Postpaid Billing
Prepaid billing solutions require the end-user to pay prior to using PBX phone services.
Prepaid billing is commonly used by VoIP service providers: the user pays one
monthly fee for unlimited calling prior to making calls. Additional services such as
calling cards or conferences utilize prepaid billing. In the prepaid billing model the
PBX must access the user’s funds before a call is made and be able to disconnect a
call when funds run out. Some prepaid billing solutions are Personal Identification
Number (PIN) based, requiring users to enter a PIN prior to making calls. PINbased
solutions are best compared to calling cards. Other prepaid solutions may make
use of Automatic Number Identification (ANI) to identify callers. ANI is passed and
carried from your phone to the PBX, which servers as an identifier. In prepaid solution
scenarios, the caller must be identified and have sufficient funds prior to making
a call.
Post-paid billing solutions bill users periodically after they use phone services.
PBX accounting records such as Asterisk’s CSV file can be imported into a database
and queried for billing records. Sample billing database queries can be based on
accounting codes, or source or destination phone numbers.
Tools & Traps…
Asterisk PBX Open Source Billing Solutions
Users can choose several types of Asterisk PBX open source billing solutions,
including the following:
A2Billing http://voip-info.org/wiki/view/A2Billing
AstBill http://astbill.com/
MCC www.paskambink.lt/mcc/
Trabas www.trabas.com/opensource/
Freeside www.sisd.com/freeside/
Visit www.voip-info.org/wiki/view/Asterisk+billing for more commercial and
open source billing solutions.
Routing
After looking up its dial plan for a specific call handling instruction, PBX must route
calls to their desired destination. Routing the call allows the voice network to communicate
with its peers and desired destinations. Calls can be routed based on lowest
cost path, time of day, disaster recovery, and other criteria.
Time-of-Day Routing
Time-of-day routing influences call routing by using a time variable. Have you ever
called a support line after business hours and ended up talking to someone in a different
country? Your call was routed based on the time of day.This solution often is
used by multiple call support centers in different geographic locations. For example, a
company with support hours from 8 A.M. to 8 P.M. EST with two call centers, one in
New York and one in California, may chose to start routing morning calls to its New
York facility due to the time being three hours earlier in California. As the time
changes, additional coverage can be offered by distributing calls to the west facility.
Day-of-Week Routing
Day-of-week routing influences call routing by the date variable.This routing functionality
can be used for call centers that may alternate between 12-hour shift schedules.
During designated holiday dates, calls can be routed to different countries that
may not have same date holidays.
Source Number Routing
Source number routing influences call routing by source phone variable.This solution
is best used with 800 number services or when a company has a central contact
number.To reduce expenses, you would choose to route calls to the closest possible
destination, keeping calls local when possible, in order to save on toll charges.You
may also prefer for your customers to speak with a local call center rather than a call
center out of state (or vice versa since some in-state toll rates exceed interstate rates).
Cost-Savings Routing
As the name implies, cost-savings routing selects the least expensive call path.A
desired solution is defined as using your data VoIP networks to route all your
interoffice voice calls, thereby avoiding any telephone company toll charges. Cost
savings is one of the biggest advantages in VoIP technology.
Disaster Routing
Having multiple routing paths for your voice traffic allows for quick disaster
recovery. In VoIP networks where one of your data connections used for voice to
the local Internet provider fails, it automatically will be recovered by a secondary
backup data connection to a different Internet provider, or you may chose to reroute
traffic to your phone company over traditional phone lines.VoIP provides redundancy
by automatically routing calls to a different destination when links fail.
Disaster routing recovery takes place not only when your data connectivity or phone
connectivity goes down, but also when one of your PBX systems that decided to
retire a bit early; calls must be rerouted through a different PBX or to a different call
center altogether.
Call rerouting can be further initiated by the capacity of trunk lines to assure
maximum voice quality. When one link is congested, rather than continuing to send
calls down the congested link and decreasing the overall quality of new and existing
connections, calls are sent to a new trunk with free available resource. Asterisk PBX
system has the ability to limit outgoing calls per trunk to avoid possible congestion.
Monday, March 10, 2008
> Billing Accounting with Asterisk PBX System
Labels:
VoIP Securities
Subscribe to:
Post Comments (Atom)
1 comment:
nice info,
hi bro, i am searching for CDR accounting of VOIP by using AS 5350 as gateway
my question is, do you have doc about standard of value in the cisco AVPAIR, e,g how much threshold of loss packet, round trip in milli second etc
appreciate for your help
my mail:yesuda@yahoo.com
url http://layanandata.blogspot.com
Post a Comment