Weekly Padgett

No. 0021 min read

Billing mediation: somebody has to find the damned money

Fourteen years between the switch and the bill, finding missing money in binary records. What telecom mediation does, and why two bytes can ruin your day.

A kneeling person holds a dustpan beside scattered debris beneath a desk with reel-to-reel equipment.
File photoDramatization. No telecom was harmed.

You hear "billing mediation[1]Ref. 1billing mediation en.wikipedia.org" and probably picture me spending fourteen years looking at invoices. I understand, but there is a looooong way to go before an invoice exists, and I worked in the middle where a phone company either makes its money or quietly loses it.

The switch doesn't give a damn about your rate plan. It records the A-number, B-number, start time, duration, cell site, trunk group, cause code, and a few dozen other fields in a proprietary binary structure.

Billing needs somebody to translate that thing before it can rate it, which is where mediation comes in.

Collection means pulling files from 130 switches over whatever they support: FTP[2]Ref. 2FTP rfc-editor.org, X.25[3]Ref. 3X.25 en.wikipedia.org on the old ones, a vendor-specific push. It runs on a schedule, and you verify every file in the sequence and scream when a number is missing. The call already happened. That gap is unbilled revenue until somebody gets its record.

Then you parse the binary. Release 17 added a field and shifted everything after it by two bytes, and nobody told you. Plenty of room to fuck up your afternoon.

Reconciliation means counting what came in against what went out at every stage, then explaining every difference. You don't get to shrug at the leftovers.

Over fourteen years I recovered tens of millions of dollars finding that shit. Mangled headers, truncated tails, sequence gaps, records rejected into an error queue nobody watched. It was hex dumps[4]Ref. 4hex dumps en.wikipedia.org and "why did this file stop at byte 48,201?" I am proud of that work, even if I mostly remember staring at hex dumps.

And I still want to look in that fucking error queue.

References

  1. billing mediation en.wikipedia.org ↩
  2. FTP rfc-editor.org ↩
  3. X.25 en.wikipedia.org ↩
  4. hex dumps en.wikipedia.org ↩

More on this beat