Applies to VoipNow 3 and higher! |
This article explains how to use the best cost algorithm to route outgoing calls based on the available channels and the charged cost.
The Best Cost
Routing Rules rules are used to route the call using the best cost available. The server finds all the channels with costs for the target number (including free channels), selects the best matches from each channel, and in the end orders the channels starting with the "lowest cost first". It takes the first channel in the list and uses it to connect the outgoing call. If the route fails, then the application will take the next lowest cost channel available, so on and so forth, moving upwards to more expensive channels.
Let us take for example the following rule:
Routing Rule 1
set up for number 12. routing the call through the Best Cost
rule.
There are four channels defined in the system:
If an extension dials 12345:
Routing Rule 1
applies. All the available enabled channels are inspected. The server selects all channels with costs defined for number 12345.Routing Rule 1
ends here.The setup cost can influence the choice of the best cost route only if the parameter Average call duration was set in System preferences >> Charging tab.
For example, let us assume that we have two channels with the following call costs:
Charge 0.1 USD/60 seconds with a setup cost of 1 USD
Charge 0.9 USD/60 seconds with a setup cost of 0.2 USD
The server finds all the channels with costs for the target number (including free channels), selects the best matches from each channel, and in the end orders the channels, considering the most cost-effective alternative to route the call by means of the following formula:
min((setup_cost/average_call*charging_interval + call_cost)/ charging_interval*average_call)
For example, if the average_call duration is 180 seconds, the results are:
(1 USD/180 s * 60 s + 0.1 USD)/60 s * 180 s = (0.33 + 0.1)*3 = 1.3 USD
(0.2 USD/180 s * 60 s + 0.9 USD)/60 s * 180 s = (0.3 + 0.2) * 3 = 1.5 USD
In conclusion, even if the setup fee is bigger, the cost of an average length call is smaller via Channel #1. VoipNow Professional normally routes average and longer length calls using the channel with the best cost.