Call rating turns each call record (CDR) into a price on an invoice. PracBill first works out what kind of call it is (the call type), then finds which rate card applies, then prices the call from that card. This page explains the pieces and how they fit; for building a card step by step see Create a rate card.
| Step | What PracBill does |
|---|---|
| 1. Match the service | Finds the service the call belongs to using the CDR fields the call type names (account code, caller ID, destination or DID). Calls that match no service land in Telco → Exception Calls. |
| 2. Match a call type | Tests every call type's patterns against the CDR. Where several match, the highest Priority wins. |
| 3. Pick the rate card | Uses the most specific card that has a rate for that call type (see the order below). |
| 4. Price the call | Rounds the duration up to the card's billing increment, then applies the rate line for that call type: per-minute rate or flat price, flagfall, free minutes, minimum and maximum cost. Each call's cost is rounded up to the next cent (or to 4 decimal places if the customer's Rounding Decimal Places is set to 4); SMS and MMS charges are not rounded. |
| Order | Rate card | Set where |
|---|---|---|
| 1 (most specific) | Service custom rate | Call Rates on the service, under Billing Options |
| 2 | Customer custom rate | Call Rates on the customer. Only used when the service has no card of its own |
| 3 | Service type default | Call Rates on the service type |
| 4 | Department default | Department settings |
PracBill chooses the card separately for each call type, so one service's local calls and mobile calls can be priced from different cards. A card only counts for a call type if it has a rate line for it. If it doesn't, PracBill moves down the list. One exception: when the service has a card of its own, the customer's card is skipped, even if the service's card has no line for that call type. If none of these cards has a line for the call type, the call is priced at $0 and PracBill records a rating error. International calls also fall back to PracBill's built-in international rates: see International calls below.
Call types classify traffic: mobile, national, 13/1300/1800, international, inbound, data, SMS. Rates hang off call types, so set them up before building rate cards.



| Field | What it does |
|---|---|
| Name / Internal Code | Name shown on rate lines and invoices; short code used in reports. |
| Direction | Inbound or Outbound. |
| Account Code Pattern / Caller ID Pattern / Destination Pattern | Regular expressions (PCRE) tested against those CDR fields. Numbers are in E.164 without the plus: ^614 is an Australian mobile, ^61[2378] a landline, ^6113 a 1300 number. Use [0-9], not \d. |
| Application | Only match CDRs with this application value, for example DATA or Live Answering. |
| Mapping Function | Extra check for special cases: Local Call, Inbound Call Diversion, Ensure Destination is Different to account. |
| Priority | When several types match, the higher number wins. Give Local 10 and National 5 so local calls rate as local. |
| Tags | Comma-separated tags for grouping in reports. |
| Service Account Fields | Which CDR fields (Account Code, Caller ID, Destination, DID) identify the service the call belongs to. |
| Code | Meaning | Example |
|---|---|---|
^ |
Outside [ ]: match the start of the value |
^61 matches 61383709020 |
[ ] |
Any one of the characters listed | ^61[23] matches 6138379020 and 61299998888 |
[^ ] |
Inside [ ]: any character except those listed |
^61[^4] matches 6138379020 and 61299998888 but not mobiles |
{x,n} |
Repeat the previous set x to n times (n optional; {x} means exactly x) |
^614[0-9]{8} matches Australian mobiles such as 61411222333 |
* |
Repeat the previous set 0 or more times | ^613[0-9]* matches any Victorian number |
+ |
Repeat the previous set 1 or more times | ^614[0-9]+ matches Australian mobiles |
( ) |
Group, usually combined with \| |
61([23]\|[78]) matches 6138379020 and 61799998888 but not mobiles |
\| |
Or | ^61[2378]\|Anonymous matches landlines or blocked caller ID |
\ |
Escape a special character | ^test\.com matches test.com |
. |
Any single character | ^.+\.test\.com matches any subdomain of test.com, e.g. www.test.com |
$ |
Match the end of the value | ^614[0-9]{8}$ matches an 11-digit mobile and nothing longer |
\d |
Any digit (works in SIP domain patterns, but use [0-9] in number patterns) |
^614\d{8}$ |
\s |
Any white space | Rarely used |
A rate card (Telco → Call Rates) is a named set of rate lines, one per call type, plus international rates. The card's Billing Increment (Per Second, 30 Seconds or 1 Minute) rounds every call up before pricing.

| Column | What it does |
|---|---|
| Name / Detail | Label for the line and the call type it prices. |
| Per Min | Price per minute, ex GST, applied in the billing increment. |
| Flat Price | Charge one fixed price per call instead of per minute. |
| Flagfall | Connection fee added to every call. |
| Free Minutes | Minutes at the start of each call that are not charged. |
| Min Cost / Max Cost | Floor and ceiling for one call's price. |
| Min Call Pack / Max Call Pack | Only use this line while the customer's call pack usage is inside these limits. Disabled by default. |
Example: an inbound service charged 9c a minute with the first 10 minutes of every call free is a line with Per Min 0.09 and Free Minutes 10.
International calls are priced in one of three ways, in this order.
| Method | How it works |
|---|---|
| International Markup | International Markup Percent on the rate card adds a percentage to the cost price passed through from your carrier's CDR. 0.00 turns it off. Enter whole numbers: 27.5 for 27.5%. It takes precedence over custom rates, and protects revenue from out-of-date rate lists. If the CDR carries no charge, PracBill takes the default rate as the cost and marks that up. |
| Custom rates | The International Rates table under the rate lines: one row per Country and Code (dialling prefix) with a Price. |
| Default rates | PracBill's built-in list of rates for every known country code, for customers who make the odd international call. |

To rate international calls at $0 (for an internal service, say), set the markup to
-100.
Best match. International rates are broad by design: if any rate line matches the number, that custom rate is used, and a customer's own rate beats a default rate. Take a call from 61411222333 to 123456789 lasting 60 seconds, with these rate lines:
| Name | Country code prefix | Rate per min |
|---|---|---|
| Default | 12 | 2.00 |
| Default | 1 | 1.00 |
| Customer rate | 1 | 0.50 |
The call matches the default rate for prefix 12 ($2.00 a minute) and the customer rate for prefix 1 ($0.50 a minute). The customer rate is the best match, so the call is rated at $0.50.
Live answering (message-taking) is billed per call or per group of calls through a normal rate line on the service's rate card. The CDRs arrive with application Live Answering, so give the call type that Application.
| Rate line field | Meaning for live answering | Example 1 | Example 2 |
|---|---|---|---|
| Free Minutes | Number of calls per group. Blank bills each call individually. | 5 | 0 |
| Per Min | Price per group (or per call). | 6.00 | 1.50 |
| Flagfall | Number of calls included in the base monthly charge. Ignored when Free Minutes is blank. | 1 | 0 |
For 66 calls in a month: example 1 gives (66 - 1) / 5 = 13 groups x $6.00 = $78.00; example 2 gives 66 x $1.50 = $99.00.
The script that loads live-answering charges is installed per department by PracBill support.

If a customer is charged for local, national or mobile calls that their plan includes, the calls are being priced by a card further down the list in Which rate card wins, usually the department default card.
A $0 line still counts as a rate, so PracBill stops there and never reaches the department default. Don't fix it by removing the department default card: the calls would then be priced at $0 as rating errors.
Changing or attaching a rate card doesn't re-price calls PracBill has already rated. The new card applies to every call rated from then on, including calls made earlier that hadn't been rated yet.
To re-price earlier calls:
Good to know: Rate Calls re-prices every call in the date range, including calls on invoices you've already sent. Those invoices keep their original total, but their call detail then shows the new prices, so the two no longer match. Where you can, start the date range after the last period you've invoiced.
Don't use Delete Calls or Credit Calls on an invoice line to fix this. They don't reliably remove the charge at the moment, so use a credit as in step 3.
Related: Create a rate card, Data services, Bill runs.