Billing practice

Rate every call twice, once for sale and once for purchase

Per-call margin needs a sell charge and a buy charge on every call. A worked example shows a cheaper route that loses money because of its billing increment.

A wholesale carrier has two prices for every call: what the customer pays and what the vendor charges. Many billing systems rate only the first and estimate the second from a monthly vendor invoice or an average cost per minute. That works until a route loses money in a way no average shows.

What rating twice means

For each answered call, produce two charges at the time the CDR is processed:

  • Sell charge: the customer's deck version effective at answer time, with the customer's increments, rounding and connection fee.
  • Buy charge: the vendor's deck version effective at answer time, with the vendor's increments and rounding, for the peer the call actually used.

Margin is sell minus buy, computed per call and stored with it. Aggregation to a destination, a customer, a vendor or a day is a sum afterwards. The reverse is impossible: you cannot recover per-call margin from totals.

The two charges differ in structure as well as in price. The customer and the vendor can have different billing increments, different duration rounding and different currencies. Each call has to be priced under each side's own rules. Averaging the vendor's cost per minute over a month hides the one thing that decides margin on short calls.

Where the margin goes: a worked example

Six calls to a UK mobile destination, with numbers from Ofcom's drama range such as +44 7700 900101. The customer pays €0.0300 per minute billed per second (1/1). Two vendors are available:

  • Vendor A charges €0.0270 per minute, billed in 60-second blocks (60/60).
  • Vendor B charges €0.0285 per minute, billed in 6-second blocks (6/6).

Vendor A is 5.3% cheaper per minute. Here is what each call yields.

CallSecondsSell (1/1)Vendor A buy (60/60)Margin on AVendor B buy (6/6)Margin on B
14€0.0020€0.0270-€0.0250€0.00285-€0.00085
218€0.0090€0.0270-€0.0180€0.00855+€0.00045
345€0.0225€0.0270-€0.0045€0.0228-€0.0003
461€0.0305€0.0540-€0.0235€0.03135-€0.00085
595€0.0475€0.0540-€0.0065€0.0456+€0.0019
6320€0.1600€0.1620-€0.0020€0.1539+€0.0061
Total543€0.2715€0.3510-€0.0795€0.26505+€0.00645

The vendor with the lower per-minute price loses €0.0795 on nine minutes of traffic, and the dearer one makes a small profit. Every call through Vendor A is negative, because the customer is billed for the seconds used and the vendor bills the block. A call of 61 seconds costs two blocks. The pattern depends on the call length mix: with a long average duration the 60/60 penalty shrinks, and with short calls it dominates.

A comparison of headline rates would have picked Vendor A. A per-call comparison picks Vendor B, and does it with data you can check line by line.

What you can do with per-call margin

Negative-margin detection. Query for calls whose margin is below zero, grouped by destination and vendor. In the table above, the whole Vendor A route shows up immediately. In real traffic the signal is subtler, such as one prefix with a cost that moved after a vendor upload, or a customer who has moved to short-duration traffic.

Routing floors. If margin is known per call before routing, the router can drop any candidate whose expected margin is below a floor, expressed as an absolute amount, a percentage of sell, or both. The expected margin depends on call duration, which is unknown in advance, so the floor works on a reference duration, typically the destination's recent average. Calls that routinely run longer than that will earn more than the floor, and calls that run shorter, less.

Vendor performance. Margin per vendor next to answer-seizure ratio and average call duration tells you whether a cheap vendor is cheap in practice.

Deck review. Margin by prefix shows where a sell deck was priced against a stale buy price. It is a more reliable trigger for a price review than a quarterly meeting.

What breaks it

  • Missing buy charge. A call with a sell charge and no buy charge looks like 100% margin. Report calls with an unrated side as a data-quality count and keep them out of margin totals until fixed.
  • Different currencies. Sell in euros and buy in dollars needs a conversion at a stated rate. Convert each charge at the rate for the call's day, and record the rate used, so margin can be re-derived. FX gains and losses between invoicing and payment are a separate matter from per-call margin.
  • Late vendor decks. If the buy deck loaded after the calls arrived, the buy charges were rated against an older version. Re-rate once the correct version is in, and keep both runs distinguishable.
  • Wrong peer. The buy charge must follow the peer that carried the call, including after a retry. A call that failed over from Vendor A to Vendor B belongs to Vendor B's deck.
  • Rounding mismatch. Both sides need the exact duration the SBC reported, so that each applies its own rounding. Storing whole seconds first and rating afterwards throws away the information the vendor's rounding depends on.

A short checklist

  1. Store sell and buy charges on every call, with the deck version and rate used for each.
  2. Rate each side under its own increments, rounding and currency.
  3. Keep margin queryable per call, per destination and per vendor.
  4. Alert on negative margin by destination and vendor, with a minimum call count to avoid noise.
  5. Give the router a margin floor, and review the reference duration it uses.
  6. Count unrated calls separately and treat them as a fault.

More from the blog

Contact sales

Talk to us about your traffic and your billing.

Tell us about your network and we will arrange a demonstration of YepSBC, YepMsg, YepShield, YepBoss and YepPBX on a traffic profile like yours, or a technical call with one of our engineers.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice