Revenue Leakage Detection: Reconciling AAA Accounting Against Billing Records

TLDR

  • Revenue leakage detection finds usage the network delivered that billing never charged, or charged wrongly.
  • For data services, the core test is usage reconciliation: matching each authentication, authorization and accounting (AAA) session to a rated billing record.
  • Five mismatches to check first: missing Stop records, duplicate Starts, ignored gigaword counters, clock skew and orphan sessions.
  • Run the match every day, and close it before each bill run.

It’s month-end at a fixed-broadband internet service provider (ISP). The network team says the broadband network gateways (BNGs) just had their busiest month, while finance says data revenue hasn’t moved.

Neither team has made a mistake. Each is reading its own records correctly, and revenue leakage detection is the work of explaining why those records disagree.

Where leakage hides between network and bill

A data session’s usage changes hands four times on its way to the invoice: network access server (NAS) to AAA server, AAA to mediation, mediation to rating, and rating to the bill. At any of those points, a record can be dropped, counted twice, placed in the wrong time period or separated from its owner. Reconciliation compares the first record with the last one, so it catches a fault wherever it happened.

On fixed broadband, that first record is a RADIUS Accounting-Request sent to User Datagram Protocol (UDP) port 1813 (RFC 2866, Section 3). The Acct-Status-Type attribute marks it as a Start or a Stop (Section 5.1), and Interim-Update records sent between the two carry running totals for the session (RFC 2869, Section 2.1).

Comparing monthly totals is a weak test. An over-billed duplicate on one account can cancel out an under-billed counter wrap on another, and the two totals will still agree. For revenue leakage in telecom data services, matching session by session is what turns each usage discrepancy into a specific cause an engineer can go and fix.

Failures inside the AAA platform itself are covered in our guide to AAA and revenue leakage. For the full path from network usage to invoice, start with how a telecom billing system rates usage.

Five accounting vs billing mismatches

Five accounting vs billing mismatches are worth checking first, because each one leaves a pattern you can search for in the matched data. Each has a typical effect on the bill and a usual cause, and you can find all five with RADIUS attributes your mediation team already works with.

Mismatch Effect on the bill Usual cause How to find it
Missing Stop record Session never billed Stop lost after retries, or a NAS restart No Stop, and no record for two interim intervals
Duplicate Start Session billed twice Retry with a new Identifier, or failover to a second server Same NAS plus Acct-Session-Id billed twice
Gigaword wrap ignored Usage under-counted above 4 GiB Mediation drops the gigaword attributes Gigawords above zero, rated volume under 4 GiB
Clock skew Usage in the wrong cycle NAS clock drift, or a double time-zone conversion Event-Timestamp vs. receipt time minus Acct-Delay-Time
Orphan session Unbilled usage Account still live in AAA after it ended in billing AAA session with no active subscription

Missing Stop record

If the rating engine bills only on Stop records, any session whose Stop goes missing is never billed. RFC 2866 recommends that the NAS keep resending an accounting record until the server acknowledges it (Section 2). A Stop therefore usually disappears only when the NAS restarts or runs out of retries.

To find these sessions, list every session with no Stop whose last record is older than twice the Acct-Interim-Interval. If the same NAS sent an Accounting-On (Acct-Status-Type 7) after the session began, the NAS has most likely restarted, and the session is over.

The fix is to close stale sessions at their last Interim-Update and rate them from that record’s counters, which are cumulative (RFC 2869, Section 2.1). The only usage you lose is whatever the subscriber consumed after that last update.

Duplicate Start record

Duplicate session billing happens when mediation opens a new session for every Start it receives, so one repeated Start becomes two billed sessions. The accounting server treats a packet as a repeat when its source IP address, source port and Identifier all match a recent packet (RFC 2866, Section 3). A NAS that updates Acct-Delay-Time on a retry must also change the Identifier (Section 4.1), so the retry looks new. Failover to a second server (Section 2) has the same effect.

To catch it, group rated records by NAS identity plus Acct-Session-Id (the session’s accounting ID, RFC 2866 Section 5.5), and flag any combination billed more than once. Acct-Session-Id on its own is not enough, because two different NASes can issue the same value.

The fix belongs in mediation. Treat that combined key as unique, so a repeated record updates the session it belongs to instead of creating a second one.

Gigaword counter wrap

Acct-Input-Octets and Acct-Output-Octets are 32-bit counters (RFC 2866, Sections 5.3 and 5.4), and each one wraps back to zero after 2³² bytes, which is 4 GiB or about 4.29 GB. RFC 2869 adds Acct-Input-Gigawords and Acct-Output-Gigawords to count how many times that happened (Sections 5.1 and 5.2). A gigaword wrap billing error occurs when mediation reads the octet counters but drops the gigaword attributes.

Take an ISP subscriber who downloads 10 GB (10,000,000,000 bytes) in a single session. Downloads count in the output direction, so the Stop record carries Acct-Output-Gigawords = 2 and Acct-Output-Octets = 1,410,065,408.

A billing system that ignores gigawords rates the session as 1.41 GB. The correct total is 2 × 4,294,967,296 + 1,410,065,408 = 10,000,000,000 bytes.

In business support system (BSS) migrations, we often find gigaword attributes reaching mediation intact and then being dropped by a field mapping written back when sessions that large were rare.

To find affected sessions, flag any with gigawords above zero and a rated volume under 4 GiB. To fix it, add gigawords × 2³² to the octet count and store the total in a 64-bit field all the way through rating.

Clock skew across the cycle

Event-Timestamp records when an event happened on the NAS, in seconds since January 1, 1970 UTC (RFC 2869, Section 5.3). When the NAS clock drifts, or mediation converts UTC to local time twice, usage close to a cycle boundary ends up in the wrong bill and gets charged against the wrong allowance.

Acct-Delay-Time gives you a second clock to check against. It counts how many seconds the NAS spent trying to send a record (RFC 2866, Section 5.2), so the server’s receipt time minus Acct-Delay-Time gives an approximate event time. Any NAS where the two clocks disagree by more than your tolerance needs attention.

To fix it, run Network Time Protocol (NTP) on every NAS and keep timestamps in UTC until the billing cycle is assigned. Sessions that cross a cycle boundary can then be split at the nearest Interim-Update.

Orphan sessions

An orphan session is usage with no billable owner: AAA accepted the subscriber, but billing has no active subscription to charge for that day. Orphans are the hardest of the five to notice, because no invoice line exists for anyone to dispute. The usual cause is provisioning drift, where an account that ended in billing stays live in AAA and its usage becomes lost revenue.

To find them, list the AAA sessions that match no subscription active on that day. Normalize User-Name first, or jdoe@isp.example in AAA and jdoe in billing will show up as a false orphan.

The fix is to deprovision AAA from the same event that ends the subscription, and to reject the Access-Request for any account without an active plan.

How to reconcile RADIUS accounting with billing

The leakage detection process has four steps: build a session view from AAA records, build one from rated records, join them on a shared key and classify every difference. Run it daily for the previous day’s sessions, and again before each bill run.

  1. Build the AAA view: one row per NAS identity plus Acct-Session-Id, using the counters from the latest record. Interim values are cumulative (RFC 2869, Section 2.1), so adding them together inflates usage.
  2. Build the billing view: one row per rated session, with its subscriber and bill cycle.
  3. Join the two views on the combined key, with User-Name normalized and every timestamp in UTC.
  4. Classify each unmatched row against the five mismatches above, and price it at the subscriber’s plan rate.

Build the AAA view from the raw records as they enter your telecom mediation layer. If you match mediation’s output against billing instead, any record mediation dropped will never show up in the comparison.

A daily run means a broken feed gets noticed within a day. The pre-bill-run close is the billing reconciliation control finance depends on. No invoice run starts until unmatched value is under an agreed threshold and every open item has an owner.

Five revenue leakage KPIs (key performance indicators), tracked per NAS and per product, turn the match into leakage analytics that show which BNG or plan to investigate first. For a broader set, TM Forum’s KPI workbook (GB941A) defines common KPIs for revenue assurance teams.

KPI What it measures A change points to
Session match rate AAA sessions with exactly one rated record A broken feed or mediation rule
Unbilled value Unmatched AAA usage, priced at plan rates Revenue at risk this cycle
Over-billed value Rated usage above AAA usage Disputes and refunds
Open-session age Sessions with no Stop after two interim intervals Lost Stops or NAS restarts
Time to resolve Days from detection to correction Whether findings turn into fixes

Preventing revenue leakage upstream

Reconciliation finds leakage after it has happened, so the cheapest fixes come earlier in the chain. Four controls reduce what the match has to find: interim accounting on every session, synchronized clocks, mediation that recognizes repeated records and one subscriber record shared by AAA and billing.

Interim accounting starts with Acct-Interim-Interval in the Access-Accept. RFC 2869 sets a minimum of 60 seconds and advises no less than 600 (Section 5.16), and a value configured on the NAS overrides whatever AAA sends (Section 2.1). That makes the NAS configuration templates worth auditing too.

Records also go missing while an accounting server is unreachable. That is why a carrier-grade AAA server needs high availability and geo-redundancy, and Alepo AAA Server supports both.

Fewer handoffs mean fewer places for a record to go missing. Digital BSS runs mediation and charging on one platform, with automated revenue assurance and fraud detection built into its analytics layer. In Eswatini Mobile’s Digital BSS deployment, online charging and mediation run together on one on-premise platform.

Revenue leakage detection tools are still needed once these controls are in place, but they start from cleaner records and spend less of their time on stale sessions and duplicates.

FAQs

Q1. What is revenue leakage detection?

Revenue leakage detection finds service an operator delivered but didn’t bill, or billed incorrectly. It is part of revenue assurance, the discipline defined in TM Forum’s GB941 guidebook.

Q2. How do you reconcile AAA accounting with billing?

Build one row per AAA session, keyed on NAS identity plus Acct-Session-Id, and one row per rated session. Join the two using normalized usernames and UTC timestamps, then classify every difference by its cause.

Q3. What causes usage mismatches?

The five to check first are missing Stop records, duplicate Starts, dropped gigaword counters, clock skew across a cycle boundary and orphan sessions with no billable account.

Q4. What are gigawords?

Gigawords are RADIUS attributes (RFC 2869, Sections 5.1 and 5.2) that count how many times a 32-bit octet counter wrapped during a session. Total usage is gigawords × 4,294,967,296, plus the octet counter.

Q5. How often should reconciliation run?

Daily for the previous day’s sessions, plus a full-cycle close before every bill run. Revenue assurance reconciliation is most useful when the invoice run can’t start until every difference has been explained.

Q6. Which KPIs track leakage?

Session match rate, unbilled value, over-billed value, open-session age and time to resolve, each reported per NAS and per product.

Conclusion

For data services, revenue leakage detection means matching every AAA accounting session to a rated billing record and giving every difference a cause. Four of the five mismatches come from how RADIUS accounting works (retries, Identifiers, 32-bit counters and NAS timestamps), and the fifth comes from provisioning drift between AAA and billing.

A practical place to start is one BNG and one bill cycle that has already closed, since its numbers won’t change while you work. Run the four-step match for that BNG and classify every unmatched row. Once the results make sense, move the check to a daily run, with a sign-off before each bill run.

At the next month-end, the network team and finance can work from one matched dataset, with a cause recorded next to every unmatched line. Book a demo to walk through your accounting and reconciliation setup with Alepo’s BSS team.

Want to see how this applies to your business? Let’s talk.

Share the Post:

Latest Posts

Receive the latest news

Subscribe To Our Newsletter

Subscribe to our Newsletter

Receive the latest news

Subscribe To Our Newsletter