Page tree

This page contains instructions on how to add a new cost to the channel.


In VoipNow, there are three distinct methods that you can use to set up the costs associated with a channel:

  • clone the costs already defined for another channel
  • upload a cost file in .csv format
  • manually add the costs using the interface

Clone channel costs

To automate the process, you can copy the costs previously defined for another channel. This feature is particularly useful if you have just created a new channel and you want to copy the area codes defined for an existing one. You will be able to manually add other costs or edit current costs after cloning.

To copy costs that have already been defined for another channel:

  1. Select the Import costs from another channel checkbox.
  2. Use the Get costs from channel drop-down list to select the channel whose costs you want to import. All channels available are displayed.
  3. Click OK to save settings and clone costs.

Importing costs from another channel must be done carefully because this operation can affect the way in which VoipNow routes calls.

Let us assume that you have manually defined the cost for area code 02. This means that calls to numbers 0219999999 and 0229999999 are charged the same. If you import costs from a channel that has defined the area code 021, calls to number 0219999999 will be charged differently from calls to number 0229999999. Review imported costs to make sure the channel will charge calls the way you intended.

The Clone Channel Costs function will only replicate the costs for area codes that are not already defined for the current channel (e.g. Let us assume that you have manually defined the cost for the area code 011. You will import the costs from a channel that has defined area codes 01 and 011. VoipNow will replicate the cost for area code 01, but will not overwrite the cost for area code 011).

Upload cost file

Uploading a cost file is a risky operation because it replaces all the costs currently associated with the channel. You should disable the channel before performing this operation.

To upload a cost file:

  1. Select the Agree to replace ALL channel costs checkbox.
  2. Choose File to upload and use the Browse button to locate it. If the cost file you are trying to upload is not valid, VoipNow will display an error message informing you about the first line that contains errors.
  3. Set the Field separator. This is the character used to separate the values from the .csv file. This field is not required. If you leave the text box empty, VoipNow assumes that the field separator is ',' (comma).
  4. Click OK to save settings, upload the file, and replace the current channel costs.

This is an example of a valid cost file. Each line of the .csv file must be written in the following format:

<Area code>, <Cost>, <Charge interval>, <Description>, <Network>, <Setup cost>, <Maximum charge>

The following record is valid:

0033, 0.02, 60, Description, MobiCom, 8, 4999

This cost rule signifies that for calls prefixed with the 0033 code, the extension is charged 0.02 <currency> every 60 seconds, whereas the one time setup cost is 8 <currency> and the maximum amount allowed for this area code is 4,999 <currency>. The <currency> is the one defined in the Unified Communications Settings Zero Priority Charging Preferences page. This cost rule applies to the MobiCom network (the network code must be provided). The Description field can be used for associating a note to the cost rule.

Other examples of valid records:

043, 0.02, 60, Cheap land calls, LandTel, 0, 150
0040, 0.20, 30, Romania, RomTelCo, 0.99, 9999999

Manually add costs

If you want to manually define channel costs for various destinations, use the controls displayed below:

Cost <cost> <currency> / <charging_interval> seconds for call to area code <area_code>. Setup cost <amount> <currency>. Maximum charge per call <max_amount>. Network code <network_code>. Description <text>


  • <cost>: The cost charged by the channel per <charging_interval> for all calls to the <area_code>.
  • <currency>: The system default currency set up in the Unified Communications → Settings → Zero Priority → Charging.
  • <charging_interval>: The time interval for which the <cost> will be charged. Default: 60 seconds.
  • <area_code>: The prefix of the destination phone number. This prefix indicates the Callee's geographical location. All outgoing calls routed through the channel to this area code will be charged with the specified amount.
  • <amount>: A setup cost that will be charged for all calls routed through this channel to the specified <area_code>. This amount will be added to the total cost of the call. The setup cost can be 0. See the Setup Cost example below to understand how this it works.
  • <max_amount>: The maximum amount that can be charged for a call, no matter its length. After reaching this sum, the call will not be disconnected. It will continue to be routed through this channel. The user will be charged just the maximum amount specified here. The maximum amount can be 0. In such conditions, the call will be practically free of charge, no matter its duration. If you do not fill in the <max_amount> field, the normal cost applies to the entire length of the call. See the Maximum Amount example below to understand how this it works.
  • <network_code>: Specify the code required to identify the network the destination phone number belongs to. For more details about number portability, you may check the Add and Remove Outgoing Routing Rules Group section.
  • <text>: Associate a 128-character limited description to the area code cost.

You can use the +/- buttons to add or remove several call costs at the same time.

If you do not add costs for all destinations, the system will not be able to route all calls.


Simple cost

Cost 0.20 USD/60 seconds for call to 0040. Setup cost 0.8 USD. Maximum charge per call 50 USD. Network code 21. Description Calls to Bucharest, Romania - land lines.

Setup cost

If the calls to the area code are charged with 0.5 USD per 60 seconds and the setup cost is 2 USD, then the total cost of a 180 seconds call is:
180 seconds * 0.5 USD/60 seconds + 2 USD = 3.5 USD

The setup cost can be used at determining the best cost for routing a call. Let us assume that we have two channels with the following call costs:

Channel #1
Charge 0.1 USD/60 seconds with a setup cost of 1 USD

Channel #2
Charge 0.9 USD/60 seconds with a setup cost of 0.2 USD

Taking into consideration the Average call duration parameter that was defined in the Unified Communications Settings Zero Priority → Charging tab, VoipNow can compute the cost for each channel and determine the most cost effective alternative to route the call using the following formula: min((setup_cost/average_call*charging_interval + call_cost)/charging_interval*average_call)

For this example, if the average_call duration is 180 seconds, the results are:

Channel #1
(1 USD/180 s * 60 s + 0.1 USD)/60 s * 180 s = (0.33 + 0.1)*3 = 1.3 USD

Channel #2
(0.9 USD/180 s * 60 s + 0.2 USD)/60 s * 180 s = (0.3 + 0.2) * 3 = 1.5 USD

In conclusion, the cost of an average length call is smaller for Channel #1, even if the setup fee is bigger. VoipNow will route the calls around the average length and longer through the channel with the best cost.

Maximum amount

A call to the area code is charged with 0.5 USD per 60 seconds and the <max_amount> is set to 5 USD. A user calls a number from this area code and speaks for 15 minutes.
The call is continued after the 10th minute, even if the <max_amount> has been reached.

Normally, this call would be charged with 15 * 0.5 USD = 7.5 USD, but because there is a <max_amount> defined, the user will pay only 5 USD.

If you do not fill in the <max_amount> box, the call will be charged with the defined cost for its entire length. For the example above, the call will be charged 7.5 USD.

  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.