Skip to content

System cache

The call engine does not read tariffs and routes from the database for every call. It keeps a prepared copy, the cache, and uses it to authorize, rate and route calls in a few milliseconds. The price is a short delay: a change you save in the panel reaches live calls only when the cache is next rebuilt, usually within a minute.

  1. You save a change. The panel writes it to the database and marks the tariff, termination route or other object as changed.
  2. The cache job runs every minute. It rebuilds the cached copy of every tariff and termination route that changed since the last run, together with DIDs and the data for on-net calls. Unchanged objects are skipped.
  3. Objects are processed one by one. A run that has to rebuild many large price lists, for example ten tariffs with 100,000 rates each, can take several minutes. Until an object is rebuilt, calls use its previous version.
  4. Uploads add one step. An uploaded rate or route file is first processed by a background job, which also starts once a minute. The tariff or termination route is locked while the job runs. The cache picks up the result on its next run.

The delay applies to the objects that rate and route calls: Tariffs and Rates, Termination Routes and their routes, Routing Groups, the DID Pool and Charging Groups.

  • 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.
  • Termination route — a vendor’s price list of prefixes used to route calls to that vendor; stored as a destination set.
  • Routing Group — a named set of routing rules assigned to a customer or account.
  • Dialplan — the rules that decide how a dialled number is authorised, rated and routed; checked with Test Dialplan.

Wait a minute and try again. Tools & Debugs → Test Dialplan runs through the call engine and its cache, so it shows exactly what a real call would get. When it still shows the old price, the cache has not been rebuilt yet.

Changes take several minutes after a bulk upload

Section titled “Changes take several minutes after a bulk upload”

Check the status line on the rates or routes screen. While it shows the upload as in progress, the job has not finished; after it finishes, allow another minute or more for the cache. Upload large price lists outside busy hours and with a future Activation Date, so that the timing does not matter. See Bulk upload and activation dates.

A call was rated with the old price right after a change

Section titled “A call was rated with the old price right after a change”

Calls that start before the cache is rebuilt use the previous version. For price changes that must take effect at an exact moment, add the new rate with an Activation Date instead of editing the active rate.