Skip to content

Local calling

Local calling gives one prefix two prices: a local price when the caller is in the same area as the called number, and the normal long-distance price otherwise. This is how US carriers bill intrastate and interstate calls, and how any operator can sell cheaper calls within a city. You switch it on per tariff for the price you charge, and per termination route for the price a vendor charges you.

  • Tariffs: open the tariff from Tariffs & Currencies → Tariff Plans or /tariffs.php and switch to the Local Calling tab. The tab is hidden for incoming tariffs.
  • Termination routes: open the route list from Vendors → Termination Routes (/destination_sets.php) and switch to the Local Calling tab. The tab is hidden for an imported list.
Screenshot "admin-panel/tariff-local-calling" has not been generated yet — see scripts/screenshots/screens.yml.

On the Local Calling tab:

Field Meaning
Enabled Turns local calling on for this tariff or termination route. Adds the local fields to its rates or routes
CLI Validation Rule Optional regular expression tested against the caller’s number before the area check. Empty means every call is checked. The panel refuses a rule with invalid syntax

With Enabled on, the rate form (and the route form of a termination route) shows:

Field Meaning
Area/State Name Name of the area the prefix belongs to, for example NY or KV. The drop-down suggests names already used in this tariff. Empty means the prefix has no local price
Local Interval 1, sec First billing increment of a local call. 0 or more
Local Price 1 Price per minute for the first interval of a local call, in the tariff currency
Local Interval N, sec Next billing increments of a local call. More than 0
Local Price N Price per minute for the next intervals. When it is 0, the panel copies Local Price 1 into it

The local fields appear once Area/State Name is filled and are hidden on a Forbidden rate. The account’s My Rates screen then shows a Local and a Long Distance column.

Screenshot "admin-panel/rate-local-calling" has not been generated yet — see scripts/screenshots/screens.yml.
  1. Open the tariff, switch to Local Calling and check Enabled.
  2. Enter a CLI Validation Rule if you need one, or leave it empty.
  3. Click Save.
  4. Open Rates and edit each prefix of the area: enter Area/State Name and the local intervals and prices. Give every prefix of the same area exactly the same name.
  5. Click Save & Close.
  6. Repeat on the termination routes of your vendors when they also charge local rates.

For many prefixes, upload the rates instead. With local calling on, the rate and route files have five more columns after Expiration Date: Area/State Name, Local Interval 1, Local Interval N, Local Price 1 and Local Price N. Download the current list first to get the exact layout. See Rates.

The switch runs the check for the tariff of the account and again for every termination route the call may be sent to.

  1. The switch finds the rate for the called number (CLD) by the longest matching prefix, as usual.
  2. If that rate has an Area/State Name, the switch tests the caller’s number (CLI) against the CLI Validation Rule. An empty rule passes every number.
  3. The switch collects all rates of the same tariff with the same Area/State Name and looks for a prefix that matches the CLI. This lookup only decides whether the call is local; the price of the CLI’s rate is not used.
  4. If such a prefix exists, the call is local: Local Interval 1, Local Price 1, Local Interval N and Local Price N of the CLD’s rate apply. Otherwise the normal Interval 1, Price 1, Interval N and Price N apply.

The same prices take part in loss protection, so a local sale price is compared with a local vendor price.

When Enable LRN is on in the routing group, the switch also looks up the LRN of the caller’s number and runs the area check with it, so a ported number is rated by the area it belongs to now. Ignore LRN on a connection makes the check for that connection’s termination route use the original CLI.

A tariff has three rates:

Prefix Area/State Name Price 1 / Price N Local Price 1 / Local Price N
38044 KV 0.10 0.02
380442 KV 0.10 0.02
38046 CN 0.12 0.03
  • A call from 380442111222 to 38044555111 matches 38044 for the CLD, area KV. The CLI matches 380442, also KV. The call is local and costs 0.02 per minute.
  • A call from 38046111222 to 38044555111 has a CLI in area CN. The call is long distance and costs 0.10 per minute.
  • A call from 38046111222 to 38046555111 is local in CN and costs 0.03 per minute.