A2Billing 2 – Least Cost Routing Mode (lcr_mode)

A2Billing V2 includes a new least cost routing mode. This makes it easier when using rate cards from different call providers that could use different length destination prefixes. A2Billing V1 used to look for the most specific rate across assigned rate cards and only use that. The new way of doing things is probably how you would assume A2Billing worked if you didn’t know.

The new LCR mode is not switched on by default in A2Billing V2. To turn it on there is a new setting in each agi-conf you have. If you have upgraded from previous versions of A2Billing then the new setting will have been created in agi-conf1, but not in any others you have. To create the new setting you can run the MySQL script for the other agi-confs that would have been run for agi-conf1. For example, to add the setting to agi-conf2 and agi-conf3 run –

INSERT INTO cc_config (config_title, config_key, config_value, config_description, config_valuetype, config_listvalues, config_group_title) VALUES
('LCR Mode', 'lcr_mode', '0', 'LCR Mode<br>0: Classic (Search the longer prefix of all ratecards, then LCR with all ratecards with this prefix)<br>1: Provider (LCR with the longer available prefix for every ratecard independently)<br>', 0, '', 'agi-conf2');

INSERT INTO cc_config (config_title, config_key, config_value, config_description, config_valuetype, config_listvalues, config_group_title) VALUES
('LCR Mode', 'lcr_mode', '0', 'LCR Mode<br>0: Classic (Search the longer prefix of all ratecards, then LCR with all ratecards with this prefix)<br>1: Provider (LCR with the longer available prefix for every ratecard independently)<br>', 0, '', 'agi-conf3');

Another point to consider is that the simulator runs using agi-conf1 by default. So you should ensure that if customers are using an a option other than agi-conf1, and are allowed to use the simulator, then the lcr_mode settings are the same across the agi-confs – or the customer could get different results in the simulator than actually making a call.