Skip to content

A call detail record (CDR) on its own is just a fact: this number, that destination, this many seconds or bytes, at this time. It has no price. The rating engine is the part of a billing system that decides what the fact costs, for this customer, on this plan, on this day.

Get it wrong and every downstream number is wrong: invoices, balances, revenue reports and partner settlements. We build OpenBRM, which rates usage with the open source OpenRate engine, so this guide ends with how it works there. The steps themselves are the same in any rating engine.

Quick summary

  • Rating is a pipeline. Decode, validate, find the customer, find the destination and time band, price, apply allowances, then store the result.
  • Small rules move real money. Rounding and minimum-charge rules can change the price of the same call by 15% or more.
  • Plan for rejects and rerating from day one. Records that fail and rates that change are normal, not exceptions.

What a CDR rating engine does

A rating engine sits between the network and the invoice. Switches, gateways and packet cores write usage records; mediation collects them; the rating engine prices them; the billing run turns priced records into bills.

3GPP's charging architecture, TS 32.240, splits this into two modes:

  • Offline charging. The network writes CDRs and sends them on in files after the event. The rating engine prices them in batches. This is how most postpaid, wholesale and interconnect billing works.
  • Online charging. The network asks for permission before and during the session, so a prepaid customer can't spend money they don't have. This usually runs over the Diameter Credit-Control application, first defined in RFC 4006 and now updated by RFC 8506.

The pricing logic is the same in both modes. What changes is when it runs: after the event, or while the customer is still on the call.

The rating pipeline, step by step

  1. Collect and decode. Records arrive as CSV, fixed-length text or binary ASN.1 files from network elements, and as TAP3 files from roaming partners. TAP3 is the GSMA's roaming record format, specified in its TD.57 document. The decoder turns each one into a common internal record.
  2. Validate and de-duplicate. Check mandatory fields, impossible durations and timestamps outside the current window. Drop exact duplicates, which are common when a file is resent.
  3. Guide to the customer. Find who owns the record: the account and subscription behind the MSISDN, IMSI, username or IP address, as they were at the time of the event. A number that changed owner last week must rate against the owner of the day.
  4. Zone and time band. Work out what kind of usage it is: local, national, mobile, international zone, roaming, premium. Then decide which time band applies, such as peak, off-peak or weekend.
  5. Find the rate and price it. Look up the customer's plan, apply the charge per unit, the rounding rule and any minimum or set-up charge.
  6. Apply allowances and discounts. Consume bundled minutes or data first, then rate the overage. Apply volume tiers and promotional discounts.
  7. Store the result. Write the rated record for the next billing run, and update the balance if the customer is prepaid or has a spending limit.
  8. Handle rejects. Records that fail any step go to an error store with a reason code, not to the bin. Fix the cause, then recycle them through the pipeline.

One call, rated two ways

A customer calls a UK mobile number on a Tuesday evening. The call lasts 154 seconds, and the off-peak rate for that zone is R1.20 a minute. Only the rounding rule differs:

Rounding ruleBilled durationCharge
Per second (1/1)154 secondsR3.08
Per started minute (60/60)180 secondsR3.60

The same call costs 17% more under per-minute rounding. Across millions of calls, that one rule is worth more than most rate changes, which is why the rounding rule belongs in the rate plan, with the price, and why it's the first thing to check when two systems disagree.

Batch, real time and rerating

  • Batch rating processes files on a schedule. It's efficient and easy to audit, and suits postpaid, wholesale and partner settlement.
  • Real-time rating answers the network during a session: how many seconds or megabytes this customer may use. It needs low latency and a balance that is always current.
  • Rerating prices records again after something changes: a rate card corrected after the fact, a late plan change or a disputed bill. A good engine can reprocess a period and replace the earlier charges without double-counting.

Some vendors sell batch and real-time rating as separate products. Others run both in one engine with one set of rate cards. The second means one place where pricing logic lives, which matters most when you rerate.

Open source CDR rating engines

EngineLanguageStrengthWatch out for
OpenRateJavaA pipeline framework for batch and real-time rating, with parsers for many record formats. Built into OpenBRM.On its own it's a framework: you build the pipeline application, or use it inside OpenBRM.
CGRateSGoA real-time online and offline charging system (OCS) with balance management, under GPLv3.A charging engine, not a billing system: invoicing, CRM and payments come from elsewhere.
BillRunPHPMediation, rating, billing and invoicing in one system, with a built-in OCS. Runs on MongoDB.Suits teams comfortable running MongoDB at scale.

Subscription billing platforms such as Kill Bill can record usage, but they don't rate telecom CDRs out of the box. For a wider shortlist that includes commercial suites, see our guide to Oracle BRM alternatives.

What to check before you choose

  • Your formats. Can it read your switch, gateway and partner files today, and how long does a new parser take?
  • Your peak, not your average. Size for the busiest hour and month-end reprocessing, then add growth.
  • Effective dating. Are rates, plans and number ownership looked up as they were at the time of the event?
  • Rounding and minimums. Can each rate plan carry its own rounding rule, minimum charge and set-up fee?
  • Rejects and recycling. Is every failed record kept with a reason, and can you re-run it after a fix?
  • Rerating. Can it reprocess a past period and replace charges cleanly?
  • Standard interfaces. If other systems need to post or read usage, check for TM Forum's TMF635 usage API; our TMF Open API guide explains what to ask.

Then test with a full day of your own records, not a demo file, and compare the output with your current system line by line.

How rating works in OpenBRM

OpenBRM rates usage with OpenRate, which runs every step above inside the billing platform:

  • Formats: delimited and fixed-length files, binary TAP and ASN.1 records, records read from a database table, and real-time Diameter and RADIUS interfaces.
  • Collection: OpenBRM 26.0.0 picks up usage files over FTP and SFTP through Spring Integration, instead of a copy script.
  • One engine for batch and real time: one set of rate cards, so a corrected rate is applied by reprocessing the affected period.
  • Straight into billing: rated usage joins subscription charges and one-off fees in the same billing run and on the same invoice. Bundled credits are consumed first, then overage is rated.
  • Your own rules: business-specific pricing logic goes into plug-ins rather than a modified core, and a parser for a new record format is typically a few hours of work.

In our tests OpenRate handles around 1,000 CDRs a second. Throughput depends on hardware, record format, rating complexity and database load, so treat that as a guide. It's plenty for most MVNOs, ISPs and VoIP providers, but not for tier-1 real-time converged charging. If that's your requirement, compare it with the commercial suites in our OpenBRM vs Oracle BRM comparison. If you run an MVNO, see open source MVNO billing on a self-hosted budget for how rating fits the wider stack.

The quickest test is your own data: download OpenBRM and rate a day of real records, or send us a sample file.

Disclaimer: Details of other projects are summarised from their public documentation and may change. The worked example uses illustrative prices. Last reviewed: November 2026.

CDR rating engines: common questions

It's the part of a telecom billing system that prices usage records. It matches each call, data session or SMS record to the customer and their plan, applies the rate, rounding, allowances and discounts, and stores a priced charge for the billing run.

Mediation collects records from the network, decodes, filters and normalises them. Rating puts a price on the clean records. Some platforms do both in one pipeline; others use separate products.

Offline charging prices records after the event, usually in batches, and suits postpaid and wholesale billing. Online charging authorises usage in real time during the session, usually over Diameter Credit-Control, so prepaid customers can't overspend.

Rerating means pricing usage again after a rate, plan or customer record changes. The engine reprocesses the affected period and replaces the earlier charges, so you don't have to correct invoices by hand.

For most MVNOs, ISPs and VoIP providers, yes. OpenRate in OpenBRM handles around 1,000 CDRs a second in our tests, and CGRateS is built for high-rate real-time charging. Test with your own peak volumes and record formats before you choose.

Sources

Rate your own CDRs with OpenBRM

Download OpenBRM and run a day of your real usage records through OpenRate, or send us a sample file and we'll show you the rated output.

Open source and self-hostable — no licence cost.