christancho wrote:
Hi,
Well, how do you generate your price list now?
My first thoughts are:
- Keep the same method for generating your price list
- If a call goes for another route is because is the cheapest route with the longest prefix. Your customer will get a lower rate.
kind regards
Christancho
Hi Christancho,
I want to say great job on your code. It will indeed solve the problem many are having with the true least cost routing. Your Fix was a simple solution that solved a major issue. But as you can see and pointed out by a MTEL your code will cause other features not to work properly or eliminate them altogether. Just to name another one, with your FIX one can not have 2 providers under the the same Tariffplan. If am not badly mistaken I believe this will effect how the fail-over works as well. If i didn't already write script to normalize the routes before entering them I would have been tickled to death to use your fix and it would of been a life-saver for me. Thank you very much for posting your fix.
I just finished up the code for MTEL.. These are the steps he takes to shorten and normalize his routes.
1. Import the first provider to A2billing using the A2billing web interface.
2. run a series of sql statements that removes the data from cc_cardcard table and shorten the prefixes when possible and outputs the data into a new table.
3. once all the providers have been processed in this manner another series of SQL scripts are ran twice to add all the routes to a table with a trigger which normalizes the prefixes based on price and outputs this data to a table.
4. Finally the last script is ran to copy the data back to the A2billing cc_ratecard table.
Due to some limitation of the MySQL trigger code this is a several step precess but the end results the data is usable so that built in a2billing least cost routing and other features work perfectly as they are intended to.
This data will not only be usable to a2billling but other other call platforms as well. The ideal way to do it is to edit the data with a script such as PHP or JAVA after it has been entered into a2billing. This would greatly simplify the way I am doing it and will not prevent other a2billing features or functions from working.
regardless how useful your code might be to you and some others i don't believe it will make it into a2billing simply because it will create a need for too many other changes. Hopefully someone will write a PHP script that will normalized prefixes for a group of tariff plans. There need to be some settings and options so user can chose which tariff plans to normalize.