YepBoss documentation

Rating and margin

How a call detail record becomes charges: dual rating against sell and buy decks, billing increments, rounding, inbound charges, re-rating and per-call margin.

YepBoss documentation

YepBoss documentation

  1. Overview
  2. Core concepts and glossary
  3. Routing
  4. Rate decks and effective dates
  5. Rating and margin
    1. From record to charge
    2. The arithmetic
    3. Time bands
    4. Margin
    5. Entities and retail charges
    6. Test calls
    7. Re-rating
    8. Imported legacy calls
    9. In the back office
  6. Credit and fraud control
  7. Invoicing and billing cycles
  8. Payments, credit notes and disputes
  9. Multi-currency and FX gain and loss
  10. E-invoicing and the general ledger
  11. SMS billing
  12. Vendor bill reconciliation
  13. Reports, report builder and customer portal
  14. REST API and MCP access

Other products

Rating turns a finished call into money. Every answered call is rated at least twice: once for what the customer pays and once for what the vendor charges. The difference is the margin on that call, available as soon as the call is rated rather than at the end of a month.

From record to charge

When the SBC posts a call detail record, YepBoss stores it, then rates it in the background. A record that stays pending for a while is picked up by a sweep, so a lost notification does not leave a call unrated.

  1. Statistics. On the first pass only, the attempts of the record are added to hourly statistics per egress and destination, and per ingress connection. A re-rate never counts a record twice.
  2. Unbillable calls. A call whose disposition is not answered is marked unbillable and nothing is posted. A disposition outside the documented vocabulary, or an answered duration beyond a sanity limit, is marked as an error with the reason, nothing is posted, and an alert is raised.
  3. Sell charge. Ingress connection, then account, then the sell deck version in force at the answer time, then the longest matching prefix, using the fallback deck if the primary has no row.
  4. Buy charge. The egress peer that carried the call, then its vendor account, then its buy deck version, then the longest matching prefix.
  5. Inbound charge. When the call was delivered to a number you hold that was assigned or active at the answer time, and the delivery peer has an inbound deck, the number's holder is charged from that deck.
  6. One transaction. The charges, their ledger entries and the balance update are written together. A customer's receivable falls by the sell charge and a vendor's payable rises by the buy charge.

If the buy side cannot be priced, the sell side is still rated and the record notes the gap, so revenue is not delayed by a missing vendor price. The record is flagged and an alert is raised.

The arithmetic

Each connection carries a duration rounding mode that matches the agreement with that carrier: up counts 1.1 seconds as 2, down counts 1.9 seconds as 1. The ingress connection's mode applies to the sell charge. The egress peer's mode applies to the buy and inbound charges. Rounding to whole seconds comes first, then grace, minimum and increments.

duration   = ceil(seconds)            (floor when rounding is "down")
if duration <= grace                  -> billable = 0, amount = 0
billable   = max(duration, minimum)
if billable <= initial                -> units = initial
else  units = initial + ceil((billable - initial) / increment) * increment
amount     = connect_fee + rate * units / 60

The amount is rounded half-up at the deck's rate precision, which defaults to six decimals. Invoices round at two decimals.

Worked example

An answered call lasts 62.3 seconds. All figures are in EUR per minute.

SideRateIncrementsDurationBilled unitsAmount
Sell, rounding up0.01206/663 s66 s0.013200
Buy, rounding up0.00851/163 s63 s0.008925

The margin is 0.013200 minus 0.008925, which is 0.004275 EUR for the call.

If sell and buy decks are in different currencies, the ledger entries are written in each account's currency using the exchange rate of the day the call was answered, while the charge record keeps the deck currency. See Multi-currency.

Time bands

A rate row can apply to peak, off-peak, weekend or all times. The deck defines peak hours and days in its own time zone, and a band-specific row beats an any row. Rating uses the band of the answer time.

Margin

Margin is the sell charge plus the inbound charge, minus the buy charge. Reports show revenue, cost and margin per customer, per vendor and per destination, and the report builder can group them in other ways. All of these use the current charges of each call.

Routing protects margin before the call is placed: a candidate egress that would leave less than the profile's minimum margin is dropped. See Routing.

Entities and retail charges

For a retail product billed through a parent account, a call carries two further charge kinds: a retail charge priced from the retail account's own deck, and a retail origination charge for calls delivered to a number given to the retail account. They are rated from the same record as the carrier's own sell charge. The entity's margin is its retail and retail origination charges minus the sell and inbound charges it pays the carrier. See Core concepts.

Test calls

Staff can place a test call to one egress peer through the SBC. It arrives on a dedicated ingress connection and is rated on its buy charge alone: the vendor's cost is recorded and payable, and nothing is sold or invoiced.

Re-rating

When a deck is corrected, staff can re-rate a range of calls, optionally for one ingress connection or one egress peer. The new charges replace the old with a version number, the previous charges are marked not current, and reversing ledger entries equal to what was actually posted are written. The reversal copies the posted amounts instead of recalculating them, so a later exchange rate edit cannot make a reversal wrong.

A call whose charge is already on an invoice that is not void is never re-rated. Correct billed calls with a credit note, or void the invoice, which releases its charges for re-rating.

Imported legacy calls

Call detail records from a previous TelcoBridges ProSBC can be imported as a legacy source. They are rated for statistics and margin, and booked to the ledger per account and month only on an explicit settlement step, so history billed elsewhere is not billed twice. Importers for other switch formats are added on request.

In the back office

A call's page shows its attempts, its decision, the kept SIP trace and both charges with the rate, increments, billable seconds and amount. Staff filter by rating status to find pending, unbillable and error records.

Contact sales

Questions about YepBoss?

Ask an engineer about your deployment, or request the full interface specifications and a demonstration of YepBoss on a traffic profile like yours.

  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