Telecom Billing for VoIP and GSM Gateways: CDRs, Rating and Prepaid
Telecom billing for VoIP turns call detail records (CDRs) into charges. Each call is recorded with its times and parties, rated against a price for its destination using a rounding rule, and then deducted from a prepaid balance or added to a postpaid invoice. Good billing software also reports quality and stops fraud early.
Whether you run a hosted PBX, resell SIP trunks or operate mobile gateways, billing errors are expensive and hard to fix after the fact. This guide covers the data, the maths, the reports and the controls — and how prepaid minute profiles work on GSM gateway lines.
What is in a CDR?
A call detail record is the raw material of telecom billing. Every switch formats CDRs differently, but useful records contain the same core fields.
| Field | What it tells you | Why it matters for billing |
|---|---|---|
| Call ID | Unique identifier, often the SIP Call-ID | De-duplication and trace lookup |
| Start (setup) time | When the INVITE arrived | Measuring PDD and attempt volume |
| Answer time | When the 200 OK was received | Billing starts here, not at setup |
| End time | When the call was released (BYE) | Defines billable duration |
| Billable seconds | End time minus answer time | The number that gets rated |
| Caller and callee | Calling and dialled numbers | Destination lookup and rating |
| Disposition | Answered, busy, no answer, failed | ASR and troubleshooting |
| Cause code | SIP response and Q.850 cause | Why the call ended or failed |
| Trunk / route / device | Which path carried the call | Cost allocation and per-line usage |
| Codec | Negotiated media codec | Quality analysis |
The most common billing error is charging from the start of the call attempt rather than the answer time. Ringing time is not talk time. A clean CDR keeps setup, answer and end timestamps separate so that billable duration is calculated correctly.
Rating and rounding
Rating finds the price for a call. The billing engine matches the dialled number against a rate table using the longest matching prefix — a rate for 44 20 (London) beats a rate for 44 (UK) — and applies the price per minute plus any connection fee.
Billing increments
Rounding rules are written as first increment / next increment, in seconds.
| Increment | Meaning | A 61-second call is billed as |
|---|---|---|
| 1/1 | Per-second from the first second | 61 seconds |
| 30/6 | 30-second minimum, then 6-second steps | 66 seconds |
| 60/1 | 1-minute minimum, then per-second | 61 seconds |
| 60/60 | Whole minutes, rounded up | 120 seconds |
Retail mobile plans commonly bill per minute; wholesale routes are more often per-second or 30/6. When you buy on one increment and sell on another, your margin depends on your average call length, so model it with real CDRs before setting prices.
Prepaid vs postpaid
| Prepaid | Postpaid | |
|---|---|---|
| How it works | Balance or minute allowance is consumed as calls happen | Usage is totalled and invoiced after the period |
| Credit risk | Low — calls stop when the balance runs out | Higher — you extend credit until payment |
| Real-time needs | Must check balance before and during each call | Can rate in batches |
| Typical users | Resellers, new customers, per-line budgets | Established enterprise accounts |
Prepaid billing is harder to build because it must be real time: the system authorises the call, reserves enough balance for a sensible maximum duration, and disconnects when funds run out. Postpaid billing can tolerate delay but needs credit limits so a single bad month cannot ruin an account.
Balances and spending limits
- Daily and monthly spend caps per account and per trunk.
- Concurrent call limits so a compromised account cannot place hundreds of calls at once.
- Destination restrictions — allow only the countries a customer actually needs.
- Low-balance alerts sent before service is affected, not after.
ASR, ACD and quality reporting
Billing data doubles as quality data. The metrics every operator watches are ASR, ACD and PDD:
- ASR (Answer-Seizure Ratio) — answered calls divided by call attempts. A sudden drop on one route or one line usually points to a technical fault.
- ACD (Average Call Duration) — total billable minutes divided by answered calls. Very short ACD can indicate audio problems (callers hang up) or misrouted calls.
- PDD (Post-Dial Delay) — time from sending the call to hearing ringing. Rising PDD often precedes failures.
ITU-T Recommendation E.411 covers network management for international traffic, including measures such as ASR. Report these metrics per route, per trunk and — for mobile gateways — per device, so one failing SIM does not hide inside a healthy average.
Fraud controls
Toll fraud typically targets unsecured trunks and PBXs and pushes calls to high-cost or premium destinations, often out of hours. Billing is your second line of defence after SIP security.
- Alert on unusual spend per hour, not just per month.
- Block premium-rate and high-risk number ranges by default and allow exceptions deliberately.
- Flag calls outside business hours and bursts of short calls to new destinations.
- Suspend automatically at a hard limit, then review — a paused account is cheaper than a disputed invoice.
- Keep CDRs long enough to meet your regulatory retention obligations and to investigate disputes.
What to look for in telecom billing software
- Accurate CDR ingestion with separate setup, answer and end times and de-duplication.
- Flexible rate tables — prefix matching, increments, connection fees, time-of-day and effective dates.
- Real-time prepaid authorisation and mid-call disconnect.
- Limits and alerts by account, trunk and line.
- Quality reporting — ASR, ACD and PDD by route and device.
- Exports and APIs for invoicing and accounting systems.
- Audit trail for rate changes and manual balance adjustments.
- Tax and invoicing features appropriate to your jurisdiction.
How GSMCalls prepaid minute profiles work
Mobile lines have a special billing problem: each SIM has its own plan and allowance set by the mobile operator. If the platform does not know how much of that allowance is left, lines run dry mid-month without warning. GSMCalls handles this with device minute profiles.
- Assign each phone a profile that mirrors its SIM plan — an allowance of minutes and a renewal cycle.
- Every answered call is recorded in the CDR against that device, using billable time from answer to hang-up.
- Alerts fire at 75%, 90% and 100% of the allowance so you can act before a line is exhausted.
- At the limit, choose the action per profile: top up the allowance, suspend the line so routing skips it, or auto-renew at the start of the next cycle.
Because routing knows which lines are suspended, calls move to devices that still have minutes instead of failing. CDRs, ASR and ACD are available per trunk, site and device across multiple sites. New to mobile gateways? Read what a GSM gateway is. See features for billing and reporting, pricing for plans from $100 per month for 10 phones, or request a demo.
Frequently asked questions
What is telecom billing software?
Telecom billing software collects call detail records from switches, rates each call against price tables, applies rounding rules, and charges prepaid balances or produces postpaid invoices. Most also report quality metrics and enforce spending limits.
When should call billing start?
Billing should start at answer time — when the 200 OK is received — and end when the call is released. Ringing time before answer should not be billed as talk time.
What does 60/60 or 1/1 billing mean?
It describes the billing increments in seconds. 60/60 bills whole minutes rounded up; 1/1 bills per second from the first second; 30/6 has a 30-second minimum and then 6-second steps.
What are ASR and ACD?
ASR (Answer-Seizure Ratio) is answered calls divided by attempts. ACD (Average Call Duration) is billable minutes divided by answered calls. Together they show whether a route or line is working well.
How do prepaid minute profiles work on GSMCalls?
Each phone gets a profile that mirrors its SIM allowance. Answered minutes are counted from CDRs, alerts fire at 75%, 90% and 100%, and at the limit the line can be topped up, suspended or auto-renewed on the next cycle.