Rating and billing
Rating turns the duration of a call into a price; billing takes that price from a balance. FlySIP does both for every entity involved in a call, the account, each customer above it and the vendor, using the tariff assigned to each of them. The rules below are the same for customers and vendors; only the direction of the money differs.
How it works
Section titled “How it works”Finding the rate. For the called number the switch takes the tariff of the account and selects the rate with the longest matching prefix. Then it does the same with the tariff of the customer who owns the account, and so on up to the root customer. Every link in the chain must have a rate, otherwise somebody would carry the call for free and the call is rejected. A rate marked Forbidden rejects the call on purpose.
Checking the credit. For every entity in the chain the switch compares Balance with Credit Limit and derives the longest duration the caller can afford. The shortest of those durations becomes the maximum duration of the call. A prepaid account with a zero balance cannot call; a postpaid customer can call until the negative balance reaches the credit limit. While the call runs, the switch reserves the balance in portions and extends the call as long as the money lasts; see Max session duration.
Calculating the price. The tariff supplies the general parameters, the rate the per-prefix ones:
| Parameter | Where | Meaning |
|---|---|---|
| Grace Period, sec | tariff | Calls shorter than this are free. 0 and 1 behave almost alike; with 1 a connected call of zero duration also pays no connect fee |
| Connect Fee | tariff | A fixed amount charged for every connected call |
| Free Seconds | tariff | Seconds after the first interval that are not charged |
| Post Call Surcharge | tariff | A percentage added to the total: 0.01 adds 1% |
| Interval 1 / Price 1 | rate | Length in seconds and price per minute of the first interval; every connected call pays the full first interval |
| Interval N / Price N | rate | Length and price per minute of every following interval; each started interval is charged in full |
In order: a call shorter than the grace period costs nothing. Otherwise the connect fee is charged, the first Interval 1 seconds are charged at Price 1, the next Free Seconds are free, and the rest is rounded up to whole Interval N intervals at Price N. The surcharge is applied to the sum, and the result is rounded to the Cost Decimal Precision of the tariff. With 60/60 intervals you bill per minute, with 60/6 the first minute in full and then per six seconds, with 1/1 per second.
Writing it down. When the call ends the switch debits the account and every customer in the chain by their own price and credits the vendor’s balance with the termination cost. Each entity gets a CDR with its price; the differences between them are your margins. Monthly invoices and the Billing Cycle of a tariff plan work on top of these CDRs.
Key terms
Section titled “Key terms”- Tariff — a named set of rates that defines how calls are priced for a customer (customer tariff) or a vendor (vendor tariff).
- Rate — the price for calls to one destination prefix within a tariff, with intervals, connect fee and effective dates.
- Billing increment — the interval in seconds (e.g.
60/1,1/1,30/6) used to round call duration when rating. - Connect fee — a fixed amount charged once per connected call.
- Balance — current amount of money on a customer or account. Negative values mean debt within the credit limit.
- Credit limit — maximum allowed debt. When balance goes below the negative credit limit, calls are blocked.
- Prepaid / Postpaid — pays before use with a zero credit limit, or is invoiced after use within a credit limit.
Common scenarios
Section titled “Common scenarios”A 61-second call is billed as two minutes
Section titled “A 61-second call is billed as two minutes”The rate uses 60/60 intervals: the first interval covers seconds 1 to 60 and the 61st second starts a second interval, which is charged in full. Set Interval N to 1 or 6 on retail tariffs if that is not what you sell.
Short calls cost money even though nobody talked
Section titled “Short calls cost money even though nobody talked”Connected calls pay the connect fee and the full first interval even when the caller hung up at once. Set Grace Period, sec to a few seconds to make such calls free, or set Connect Fee to 0.
The vendor’s invoice does not match the vendor CDRs
Section titled “The vendor’s invoice does not match the vendor CDRs”The vendor rates the same calls with their own intervals and rounding. Compare Interval 1 / Interval N and Cost Decimal Precision of the termination routes with the vendor’s price list, and check that the vendor and the termination routes use the same Time Zone so that daily totals line up. See Call cost rounding and precision.
A reseller’s customer can call although the reseller has no money
Section titled “A reseller’s customer can call although the reseller has no money”Authorization walks the whole chain, so this cannot happen for a new call: the reseller’s negative balance and credit limit are checked as well. Calls already in progress keep running until their precomputed maximum duration.