Skip to main content

Call costs, codes and spend limits

The Call costs page (/admin/call-costs) puts a price on every answered outbound call, tags calls with project codes, asks for authorization codes where you want them and keeps spending inside daily or monthly limits. Reading it needs dial_plans:read, every change dial_plans:write; the cost report and its download need reports:read. Emergency calls are never asked for a code and never stopped by a limit.

The price of a call​

Calls are priced with the rate table of Inbound and outbound rules, tab Toll fraud and CLIR. Each rate is a destination prefix (digits without +, for example 49 or 4930) with:

FieldMeaning
Price per minuteIn thousandths of your currency
TrunkOptional: the rate applies to calls on that trunk only; empty means every trunk
Connection feeCharged once per answered call
Minimum secondsThe shortest billed duration (for example 60)
Billing incrementBilled in steps of this many seconds: 1 is per second, 60 is per minute

The longest matching prefix wins; at the same length a rate of the call's own trunk wins over a rate for every trunk. A number no rate matches is priced at the default price per minute of the outbound settings. The cost is calculated when the call ends and appears in the call history (cost_micros, millionths of the currency) and in the call export.

Who pays: cost centres and sites​

Under Cost centres give each department a cost centre. Every charged call records the caller, their department, their cost centre and their site (the user's own site from Sites, else the department's) at the time of the call, so moving a person later does not rewrite last month. A user can have a personal cost centre that wins over the department's; set it with PUT /api/v1/cost-allocations.

Project codes and authorization codes​

KindWhat it is forHow it is kept
Project codeTags a call to a client, matter or project for reports and chargebackIn clear; shown in reports and on the call record
Authorization codeA PIN that lets a call through where one is required; can belong to one userOnly a hash; lists show the last two digits

Under Codes per destination choose, for national, international, premium-rate and unrecognised numbers, whether a call needs no code, a project code (an authorization code also counts) or an authorization code.

How a caller enters a code:

  • MonoPhone app and the web phone: when a call needs a code the app asks for it and dials again with it. Nothing else to do.
  • Desk phones: dial the code prefix (default *55), the code, *, then the number: *55 4711 * 0049301234567. Change or switch off the prefix under Codes per destination; it must not overlap a dial code or the caller-ID withholding prefix.

A wrong code is refused. Five wrong codes from one extension within fifteen minutes lock code entry on that extension for fifteen minutes and raise a toll-fraud alert. Dialled codes are masked in the SIP trace and in the call-reject log; authorization codes entered in the apps never appear in a dialled number.

Spend limits​

A spend limit caps the outbound cost, the outbound minutes or both, per day or per month in the company's time zone, for:

  • the whole company,
  • a department,
  • a site (its users and the users of its departments),
  • a single user.

Past the warning share (80 % by default) an alert spend_warning is raised once per period; at 100 % an alert spend_limit. From then until the period ends the limit either refuses outbound calls or lets them through with an authorization code, as you chose. Alerts appear with the toll-fraud alerts, as toll_fraud.alert events (webhooks) and, with outgoing mail configured, by mail to the alert addresses of the outbound settings and to the administrators who switched on spend alerts (Anomaly e-mails). Limits count answered calls once they end, so a call in progress can take a scope a little past its limit.

The list shows what each scope spent in the current period.

Report and chargeback export​

Pick a period and a grouping (department, cost centre, site, user, project code, authorization code or trunk) and press Show report. Download CSV gives one row per charged call (start, user, department, cost centre, site, trunk, destination, matching rate prefix, project code, authorization code name, talk and billed seconds, cost in thousandths, currency) for chargeback to cost centres.

What callers see​

MessageWhy
This call needs a project codeThe destination class needs a code and none was entered
This call needs an authorization codeThe class or a spend limit at 100 % needs an authorization code
That code is not validUnknown, turned off, or another user's personal code
Too many wrong codesCode entry is locked for a while
The spend limit for outbound calls has been reachedA limit that refuses calls is at 100 %

API​

ResourceMethods
/api/v1/call-cost-settingsGET, PUT (If-Match)
/api/v1/account-codes, /api/v1/account-codes/{id}GET, POST, PATCH, DELETE
/api/v1/cost-allocationsGET, PUT (If-Match: the ETag of the GET)
/api/v1/spend-limits, /api/v1/spend-limits/{id}GET, POST, PATCH, DELETE
/api/v1/call-costs/reportGET with from, to, group_by
/api/v1/call-costs/charges.csvGET with from, to
/api/v1/outbound-ratesGET, PUT: rates per trunk, connection fee, minimum and increment