Telecom Mediation: Turning CDRs and RADIUS Accounting Into Billable Records

By Asmita Mane · 4 Dec 2026 · Mediation Studio

TLDR

Picture a fiber subscriber streaming films from 18:00 to 21:30 on a Friday. The broadband network gateway (BNG) reports that session to the AAA (authentication, authorization, accounting) server in five packets, one of them twice. Those packets are all the billing system will ever know about that evening, so mediation has to read every one of them correctly before rating sees anything.

What telecom mediation does

Telecom mediation sits between the network and the billing stack. Network elements describe usage in their own formats, while a rating engine needs one clean record per chargeable event, tied to a subscriber. The mediation layer does that translation, and it is the last place to fix a broken record before it becomes a wrong bill.

It also goes by billing mediation or CDR mediation. Mobile networks send CDRs, usually as files, while broadband and WiFi access send RADIUS accounting as Accounting-Request packets (RFC 2866, Section 4.1).

3GPP covers the same job. In TS 32.240, the Charging Gateway Function (CGF) validates and reformats CDRs, then transfers them as files to the Billing Domain over the Bx reference point (clauses 4.3.1.3 and 4.4.1.4).

Rating and invoicing come next, and how telecom billing systems rate and invoice usage shows how mediation works in billing.

The six CDR processing steps

Every mediation system telecom operators run follows the same six CDR processing steps, for mobile CDR files and RADIUS accounting alike. Each step can fail on its own, which is why well-run pipelines count records in and out at every stage.

1. Collect usage data

Usage data collection gathers records from every source. CDR files usually arrive in batches, pushed by the network or pulled by the billing side over the Bx interface (TS 32.297, clause 5.4.1).

RADIUS accounting arrives as a near-live stream from the AAA server, which receives each Accounting-Request from the BNG. Logging arrivals per source makes a quiet source visible before it shrinks a bill.

2. Validate the format

Validation checks that each record parses and carries mandatory fields, such as the Acct-Session-Id that RFC 2866 requires (Section 5.5). Failures go to an error queue with a reason code and the raw bytes.

Counters get normalized here too. RADIUS octet counters are 32-bit and wrap after about 4.29 GB, so mediation adds back the wrap counts from the Gigawords attributes (RFC 2869, Sections 5.1 and 5.2).

3. Remove duplicates

RADIUS runs over the User Datagram Protocol (UDP), and RFC 2866 recommends that a network access server (NAS) resend each Accounting-Request until acknowledged (Section 2). A resend that updates Acct-Delay-Time (Section 5.2) also gets a new Identifier (Section 4.1), so packet-level checks miss it.

Mediation deduplicates on a business key instead: NAS identity, Acct-Session-Id, Acct-Status-Type and event time, taken from Event-Timestamp (RFC 2869, Section 5.3) or arrival time minus Acct-Delay-Time. Run this check even if the AAA server deduplicates, because file resends and collector restarts add duplicates later.

4. Correlate the session

Correlation groups every record with the same Acct-Session-Id from the same NAS into one session. Interim-Update records carry running totals since the session began (RFC 2869, Section 2.1), so mediation never adds them together; the Stop carries the final totals. If the Stop never arrives, the last interim becomes the billable record, flagged as partial.

5. Enrich the record

Enrichment adds what the network lacks. A BNG knows a username and an Internet Protocol (IP) address; billing needs an account, a plan, a billing cycle and a tax region. The lookup uses the plan in force when the session ran, so a Tuesday upgrade never reprices Monday’s usage.

In business support system (BSS) migrations, we often find record enrichment rules nobody wrote down, such as a table mapping old line IDs to accounts or a filter for test subscribers. They surface only when the new platform’s totals disagree with the old ones.

6. Deliver to rating and billing

The finished usage record goes to rating, with copies for revenue assurance, by file drop or a TMForum Open API such as TMF635 (Product Usage Management). An audit trail links each output record to its raw records for later disputes.

Worked example: one broadband session

Take one fictional fiber subscriber on a regional internet service provider (ISP) and trace their RADIUS accounting to billing. The BNG sends five accounting packets over 3.5 hours, one of them twice, and mediation turns them into one usage record.

Their Fiber 300 plan has a 500 GB monthly allowance. At login, the AAA server set Acct-Interim-Interval to 3,600 seconds (RFC 2869, Section 5.16), so interim updates arrive hourly.

Download means Acct-Output-Octets, the traffic sent toward the subscriber (RFC 2866, Section 5.4).

Arrives Record (RFC 2866, Section 5.1) Download / upload so far What mediation does
18:00:00 Start (Acct-Status-Type 1) none yet Opens the session
19:00:00 Interim-Update (3) 2.1 GB / 0.2 GB Correlates it to the session
20:00:00 Interim-Update (3) 5.0 GB / 0.4 GB Adds back one wrap (Acct-Output-Gigawords)
20:00:05 Interim-Update (3), Acct-Delay-Time 5 5.0 GB / 0.4 GB Same event time as 20:00:00, so discarded
21:00:00 Interim-Update (3) 8.3 GB / 0.7 GB Correlates it, still one wrap
21:30:00 Stop (2) 9.6 GB / 0.8 GB Final totals, two wraps added back

Correlation and enrichment produce one usage record: account 7700-4412, plan Fiber 300, 18:00 to 21:30, 9,589,934,592 octets down and 812,000,000 up, about 10.4 GB. Without the two gigaword wraps, the Stop would have read as 1.8 GB. Rating deducts 10.4 GB from the allowance.

With no overage, the rated usage record carries a charge of zero.

Had the Stop been lost, mediation would have closed the session at the 21:00 interim’s 9.0 GB, flagged as partial, and about 1.4 GB would go unbilled. In mediation for broadband usage, the interim interval sets the size of that gap.

Mediation deduplication and error handling

Mediation deduplication and error handling decide whether the bill matches what the network delivered. A well-run pipeline drops true duplicates and parks broken records in an error queue that someone works daily. Every outcome shows up in counts that revenue assurance can check.

Repeated session IDs are expected: every record in a session shares one Acct-Session-Id, and two BNGs can issue the same ID, so the key includes NAS identity.

Before go-live, write rules for four errors:

Counting records in and out of every step is the simplest form of revenue leakage detection, and teams that also reconcile AAA accounting against mediation output can see where a gap began.

Alepo’s Digital BSS includes mediation as its own module, alongside the converged online charging system (OCS) and billing. At Eswatini Mobile, the on-premise deployment covers mediation, and the operator moved to it from a multi-vendor estate in phases, run remotely, as the Eswatini Mobile case study describes.

FAQs

Q1. What is telecom mediation?

Telecom mediation is the software layer that turns raw CDRs and RADIUS accounting into enriched usage records a rating engine can price.

Q2. What does a mediation system do?

It runs six steps: collection, validation, deduplication, correlation, enrichment and delivery to rating and billing, with an audit trail back to source.

Q3. How does RADIUS accounting become a bill?

The NAS reports each session in Accounting-Request packets sharing one Acct-Session-Id (RFC 2866, Section 5.5), and mediation turns them into one usage record for rating.

Q4. How are duplicate records handled?

Mediation matches each record against a business key of NAS identity, Acct-Session-Id, Acct-Status-Type and event time, then discards and counts the repeats.

Q5. Is mediation real-time or batch?

Both. Mobile CDR files usually move in batches over the Bx interface (TS 32.297), and RADIUS accounting can be mediated as a stream.

Q6. How does mediation prevent revenue leakage?

Every record ends up in billing or an error queue. This is where mediation and revenue assurance meet: per-source counts show where records go missing.

Q7. What should mediation system requirements include?

Input formats, the deduplication key, rules for sessions with no Stop, error-queue reason codes, gigawords handling, an audit trail and per-source reconciliation counts.

Conclusion

On that Friday evening, five packets, one duplicate, two counter wraps and a plan lookup could each have changed the bill. Mediation settled all of them before rating saw the record.

Test your own pipeline the same way: follow one session above 4.29 GB from its raw packets to the rated record, and fix the first step where the numbers change.

To see mediation and charging together in Alepo’s Digital BSS, book a demo with our BSS team.