CDR
CDR
CDR
CDR Formats
The format in which CDRs are provided varies and is often configurable. Traditionally the
generating and handling of CDRs has been known in the US as Automatic Message Accounting
or AMA, a system that goes back to the 1940s. Still today, exchanges for use in North America
generate CDRs in Bellcore AMA Format or BAF.
Today, PBX and softswitches mostly generate CDRs either in comma delimited formats or they
write directly into a database.
When the CDRs have been collected (historically by shipping paper tape and later magnetic tape,
nowadays by polling and ftp) they must be checked (validation), reformatted (normalisation) and
consolidated for further processing.
The combined process of collection, validation, normalisation and consolidation is also referred
to as mediation. This can be a very complex process and it is not uncommon that telcos lose a
significant amount of revenue due to errors. At the same time the amount of CDRs to be
processed at a large telco can be absolutely mindboggling. Since CDRs represent the telco's
revenues and the amount of CDRs is tremendous, most larger telcos run their mediation on the
most powerful massively parallel and fault tolerant hardware there is known to mankind: The
Tandem Himalaya running a proprietary OS called NonStop Kernel (NSK aka Guardian), which
in this case is not an overzealous marketing name but represents the true nature of the system.
The Himalaya is almost never shut down. All maintenance is done under load, except OS
upgrades. The massive parallel architecture is based on CPU pairs which are lockstepped: Any
CPU pair that disagrees on the result of a single instruction is instantly removed from the
resource pool and shut down. Everything in a Himalaya is hotswappable - Everything! Needless
to say, Himalayas cost a fortune. If you have to ask the price, you can't afford one.
The important lesson here is this: CDRs are extremely important. Take very very good care
of them!
In the world of VoIP and softswitches where the CDRs are often generated on the same system
where they are processed, the chain of mediation is significantly less complex. Even with
multiple geographically diverse CDR sources, fast packet switched networks, ubiquitous file
sharing facilities and database resources, mediation and billing is still less of a challenge than in
the conventional telephone world.
See also
• CDR Mediation
• CDRTool
• Asterisk Billing
CDR mediation
CDR mediation is intermediary process to billing which follows CDR collection. This
is necessary to make sure calls are billed to the right entity and based on the right
tariffs.
CDR mediation consists of several processing steps. The following illustrates some
of the necessary steps to prepare VoIP Call Details Records for billing.
Normalization
Normalization is an important process that:
Caller Id normalization
A SIP caller Id "blue" <sip:999560003@ag-projects.com;user=phone> is formatted
to sip:999600003@ag-projects.com which corresponds to a billable entity in
Provider database.
Destination normalization
0235468104@gateway.com for calls in the Netherlands might have the first 0
removed and 0031 appended. After normalization the destination becomes
0031235468104@gateway.com. 0031 has a coresponding rate which can be
calculated based on a consolidated international destinations table (00 + Country
code + Subscriber number)
Rating
A process by which each call is assigned a price based on a rating table. Rating may
apply differently for PSTN related traffic than NGN related traffic.
• Time of Day
• Day of the week
• Day of the year (holidays)
• Duration
• Destination (like country or mobile network code)
• Application type (audio, video, text)
• Network traffic
Telephony-wise calls have different tariffs depending on the time of the day (peak
and of peak hours). The rating engine should be able to break the call duration into
separate durations billied with the corresponding rate. Example of rating which
allow a 41 second call to span multiple rating periods (before and after midnight):
ConnectFee: 0.0454
--
Span: 1
Duration: 11 s
Traffic: 208178 bytes
Appl: Audio
Dest: 31620 Nederland mobiel
Cust: default
Profile: 421 for weekday
Rate: 422 for 19-24h
DurationRate: 0.2040 / 60 s
TrafficRate: 0.0000
ApplRate: 0.0000
Price: 0.0374
--
Span: 2
Duration: 30 s
Traffic: 208178 bytes
Appl: Audio
Dest: 31620 Nederland mobiel
Cust: default
Profile: 421 for weekday
Rate: 422 for 0-8h
DurationRate: 0.2040 / 60 s
TrafficRate: 0.0000
ApplRate: 0.0000
Price: 0.102
NGN Rating
Multiple time-zones
SIP based traffic may originate from customers located geographically in different
zones. The normalization should take into account the time zone of Calling Party (to
display the correct start and stop time), the Billing Party (to apply the peak/off-peak
tariff of the service provider servicing the Calling Party).
Export
Communication with external systems could be realised in common understood
formats.
Examples:
• SOAP/XML
• Comma Separated Values (a.k.a CSV format)
The examples have been extracted from CDRTool an NGN ready mediation system.
CDRTool
http://www.ag-projects.com/CDRTool.html
CDRTool is an Operational System Support (OSS) for service providers. CDRTool allows real
time web access to Call Detail Records generated by VoIP switches, gateways or network access
equipment using RADIUS protocol.
CDRTool provides real-time mediation including normalization and rating for Call Detail
Records generated by SIP Proxies and VoIP gateways. Combined PSTN rating based on
time/destination with NGN rating based on traffic/application provides the ideal billing platform.
CDRTool supports SIP Express Router, Asterisk PBX and other RADIUS gateways.
Rating can be selected based on time of the day, day of the week, subscriber, customer or
gateway. A different tariff may be applied based on application type (video or audio). The rates
are linked with profiles corresponding with different time of the day, day of the week or
holidays. For rating calls which span multiple profiles, the right rate is selected and applied for
the call duration within each profile. Each customer may be assigned its own dedicated rating
plans destination id and names. Different tariffs may be applied based on application type (video
or audio). Having access to service usage information, you may build any billing model for your
business based on any combination of bandwidth, destination, application type and duration.
Multiple timezones are supported for multiple billing parties hosted on the same platform.
Features
• Rating engine
• Call control and prepaid engine
• Link searches to trouble-tickets
• Trace calls between gateways
• Consolidated specification
• Access to CDRs per user/domain/gateway/proxy
• Export results in CSV format
Data sources
CDRTool achieves 100% accurate accounting for Call Detail Records generated by SIP EXpress
Router used in combination with MediaProxy and Free-RADIUS server.
Asterisk generates a CDR (Call Detail Record) for each call. By default, records are
stored in comma-separated value file will be created in /var/log/asterisk/cdr-csv. You
can specify account codes and AMA (Automated Message Accounting) flags on a
per-channel (Zaptel et al) or per-user (IAX, SIP) basis to help with accounting. Look
at the top of cdr/cdr_csv.c to see the format for the records.
Fields
Account codes and flags are set in the various channel configuration files or in the
extension definition in extensions.conf.
Asterisk Applications
• Asterisk cmd AppendCDRUserField - Append data to CDR User field
• Asterisk cmd Authenticate - Authenticates and sets the account code
• Asterisk cmd ForkCDR
• Asterisk cmd NoCDR: Make sure no CDR is saved for a specific call
• Asterisk cmd ResetCDR: Reset CDR
• Asterisk cmd SetAccount: Set account code for billing
• Asterisk cmd SetAMAFlags: Set AMAflags for this call
• Asterisk cmd SetCDRUserField - Set CDR user field
Limitations
• A CDR record will not be created if you use a .call file that calls an application
instead of an extension. Workaround: Use an extension that then starts the
desired application. See also: Bug report 240
• You can't use exten => h, if you have any hope of getting accurate billing
info. Its wise to call ResetCDR(w) in your exten => h, or not use it at all.
IAX: If you are trying to collect records on IAX to IAX calls you need to be aware
that by default, IAX will attempt to transfer calls in this situation (if DTMF is not
required). When the transfer is completed the call is dumped from the middle
machine and thus the call detail records will report a short call time. If you want
detailed records you must turn off IAX transfer (transfer=no in 1.4 or
notransfer=yes in 1.2), but unless your servers are very close together, you will
definitely get a latency hit from doing so.
Background info on confusing CDRs
The core of Asterisk is a threading model but a very conservative one. Only
origination channels and channels executing an application have threads. The B leg
of any call operate only within the same thread as the A leg and when something
happens like a call transfer the channel must first be transferred to a threaded
mode which often times includes a practice called channel masquerade, a process
where all the internals of a channel are torn from one dynamic memory object and
placed into another. A practice that was once described in the code comments as
being “nasty”.
The same went for the opposite operation the thread was discarded by cloning the
channel and letting the original hang-up which also required hacking the cdr
structure to avoid seeing it as a new call. One will often see 3 or 4 channels up
for a single call during a call transfer because of this.
For Asterisk 1.6 (or later) we might see a completely re-designed method to
generate and store CDR data.
Pre-paid applications
If you have users that you have little or no contact with, or where fraudulent usage
can be an issue, it might be worth looking at Pre-paid solutions. With the pre-paid
model we need to access a users funds before the call is made in order to see how
much cash is available for the call to be made. Next, once the call destination is
known, we should start a timer to disconnect the call (or more userfriendly,
interrupt the call with an announcement) and finally close the deal.
• take care of multiple calls using the same credentials (PIN or username)
• the SIP protocol does not allow for recognition of a client that was
disconnected
• cut off the call when the credit has dropped to 0
• the hard part is to correctly rate a call, e.g. attaching the correct tariff
Post-paid (billing)
A2Billing:
astCDRview:
AstPP:
• AstPP is not only a web-based, user friendly billing interface for Asterisk and
VOIP. It is also provides a gui editor for REALTIME devices and dialplans.
AstPP is Open Source and under constant development. Prepaid, Postpaid and
Calling Cards supported as well as resellers, lcr, callbacks,etc. -
http://www.astpp.org/
Freeside
• http://translate.google.com/translate?hl=fr&sl=fr&tl=en&u=comdif.com
• http://translate.google.com/translate?hl=fr&sl=fr&tl=en&u=comdif.com/blog.
The best new is that Cybercallshop have advanced routing system and you can use
1 to 5 cheap Voip provider of your choice
for each destination !! enjoy
Now Cyberhotel is online , Cyberhotel have a special GUI for hotel with powerfull
wakeup system and many more.
All our systems are as well available to install on Linux server
• http://www.callaccounting.ws
Call Accounting Mate is a call accounting software that can be used in institutions
such as offices, hospitals, universities, and organizations that need to allocate
telecom costs to various individuals, departments or cost centers. It can also be
used to monitor telephone costs and productivity of each and every employee in
the company. Call Accounting Mate includes more than 50 built-in reports, support
for accounts codes and pin codes, multiple operator support, contacts database to
quickly identify business and personal calls, client billing, flexible cost calculation,
support for both incoming and outgoing calls, built-in query builder, and support for
most telephone and PBX systems.
Support for asterisk is in the form of a custom CDR module which is included or
directly via the mysql database. Asterisk Support forum for the software is located
at Call Accounting Asterisk and more information is available at Call Accounting Site
.
CenIP SoftSwitch:
• http://www.cenip.com.ar/
• http://www.cybexdev.com
Prepaid & PostPaid Included. Wholesale, End-User, Calling Cards.
We provide the lowest price.
Datatex Dynamics
• http://www.datatex.co.za
Datatex has been developing software solutions for the telephony industry since
1999.
Topaz Next Generation (TNG)
• http://www.datatex.co.za/tng4a/index.html
TNG is the latest Telephone Management System (TMS) or billing system released.
The Asterisk version of TNG has the following features:
• Generates a call record for each part of a transferred call. (e.g. call
transferred 5 times will show 5 call records
• Calls transferred or forwarded to queues will properly show the extension the
call ended up on.
• Transferred unanswered calls properly identified.
• Runs on Windows or Linux.
• Connects to the standard Asterisk Manager Interface.
• Report drill down from summary level to detailed calls.
• Report scheduling to email reports automatically.
• Main features:
Online administration from any web brower
Multiple rate plans management
Multiple providers management
Multiple currencies management
Prepaid and postpaid accounts management
Reports displaying margin per destination
Real time quality statistics (ASR, ACD, PDD)
RADIUS AAA server (with RADIUS client for Asterisk)
• http://www.omniware.ca
Operates a hosted billing system services for ITSPs and ISPs. Also offered as
standalone product. Used in two deployments by Bell Canada, and designed to be
very flexible.
• Free PayPal - IPN and PayPal - IPN Subscription Starter Kit Software
• VanAbel.Com -- Free PayPal - IPN Starter Kit
• VanAbel.Com -- Free PayPal - IPN Subscription Starter Kit
• These applications, while not originally written for VoIP back in 2000-2001,
can provide excellent insight into using PayPal for small to medium size VoIP
businesses.
• Sorry, we can not offer support for free applications.
Phonyx
• http://www.samreports.com
SipTar Billing Server - Integrated Asterisk Billing, Routing Solution & SMS,
TTS, CallBack and Calling Card
SipTar Billing Server - SipTar Billing For Asterisk - SipTar Billing Server is a powerful
billing and routing system, SipTar Callshop, SMS, Callback, Text To Speech Message
and Calling Card System.
Streamco Smartswitch
• http://streamco.org.ua/en/products/smartswitch
• http://www.supertec.com/solutions
Super Technologies has been in VOIP service since 1999. Was the first
company
in the world to offer a DID number on a IP Device similar to vonage, and got an
award
on the service from Internet Telephony Magazine and in the Internet Wrold Show in
2001.
With this experience and software in use for over 5 years now, they are now
offering
the same software that they use for their own services, to the world to offer billing
to their clients.
They have software for VONAGE Type Service, Net2phone and ip centrex services,
sample are all working and live
you can check them out on www.phoneopia.com www.superphoneunlimited.com
and ip-pabx.com
Telcotwo 2.0
• http://www.telcotwo.com
What Is TelcoTwo2.0?
TelcoTwo2.0 Call Accounting is an Internet application and business tool, designed
to benefit the reseller and the customer in ways that old fashioned stand alone call
accounting software just cannot do.
TelcoTwo2.0 Call Accounting is designed to generate profit for the reseller in all
aspects of your service. Least Cost Routing, equipment provision, and elevating the
customer's perception of your company through unique "your brand" options.
When You Use TelcoTwo2.0, you will:
* PBX resellers
* Telecoms Consultants
* Large Businesses
* Small Businesses
If you are service providers and would like to offer services to residential and
business users, this is definitely the right solution for you!
vspPanel - Integrated Asterisk Billing Solution & Control Panel
vspPanel - Asterisk Control Panel - vspPanel is a full control panel system for the
Asterisk PBX and has been designed as a "VSP In A Box" solution, much like it's
counterpart CPanel in the Web Hosting Industry vspPanel allows users to control all
aspects of their Asterisk server from a web interface, along with call routing, adding
of providers and customers and most importantly billing (Both Pre-paid and Post-
Paid). vspPanel does not require any additional hardware and is already begining to
be offered in Data Centers around the world as a VOIP Provider Hosted Solution,
however it may be installed on any Linux Server along with Asterisk. vspPanel has
been designed to allow any entreprenuer to become a VSP and offer VSP services to
their customers and alleviates the need for an operator to be a "technical guru".
• Homepage: http://www.yakasoftware.com
See also
• Algorithm to parse country code out a phone number
• Asterisk administration
• Asterisk CDR csv conversion mysql
• Asterisk CDR csv handling
• Asterisk CDR csv mysql import
• Asterisk Prepaid Applications
• CDR mediation
• Call Accounting Software
• Open Source Billing Systems
• VOIP Billing