Trunk Rates
In the telecommunications environment it is common to bill phone calls based on their destination and their duration. The PBX supports this kind of billing based on the selected trunk, using CSV-based tables. The lines of the CSV are sorted; after the first match the system stop searching for another match.
The lines of the table consists of the following fields:
- Name: This is the name for the destination. It is possible to use the same name in multiple lines (for example several entries for calling Canada from the US).
- Prefix: The PBX matches entries by their prefix. The number is in the global format, starting with a
+
. If the prefix is an asterisk, it means that this line is the default rule. - Price: The price for the call. The currency for the price is set in the trunk (for monthly billing the price comes from the billing settings).
- Period (optional): The duration for the billing period in seconds. If not provided the system will use 60 seconds.
- Upfront (optional): Some destinations have connection fee that is changed when the call connects.
- Direction (optional): If you put the flag
i
here the row will apply for inbound calls, otherwise it will apply for outbound calls
In order to deal with semi-flat rates there is an extension to the name available. If a name contains a slash, the name is split up into fields. The first field contains the name to be used in the billing, the second name the number of included periods (typically minutes). If there is a third parameter, it includes how much costs are included in the rate; if the third parameter is not present it is calculated by the prices times the included periods. For example, in order to have a national call rate with 1000 minutes included, you could use the line Domestic/1000,*,0.01
for domestic calls at one cent per minute after 1000 minutes.
When trunk rates are used, the domain or the extension must have enough credit to start the call. If the balance falls below the period cost, the PBX will disconnect the call.
Webpage on the PBX to set the trunk call rates on:
CSV Example
The following example shows a table that matches routes into Canada seperately from routes to the USA and some other routes to other destinations:
Canada,+1204,0.1
Canada,+1250,0.1
Canada,+1289,0.1
Canada,+1306,0.1
Canada,+1403,0.1
Canada,+1416,0.1
Canada,+1418,0.1
Canada,+1450,0.1
Canada,+1506,0.1
Canada,+1514,0.1
Canada,+1519,0.1
Canada,+1604,0.1
Canada,+1613,0.1
Canada,+1647,0.1
Canada,+1705,0.1
Canada,+1709,0.1
Canada,+1778,0.1
Canada,+1780,0.1
Canada,+1807,0.1
Canada,+1819,0.1
Canada,+1867,0.1
Canada,+1902,0.1
Canada,+1905,0.1
USA/1000,+1,0.05
Greece,+30,0.10
Germany,+49,0.15
Cuba,+527,0.45,55,1.00
Rest of World,*,0.25