Hi It all depends on your database design. What you can do is first have a provider's rates table. It will have the provider name/id, the destination prefix, and price. So, when you have a full destination number (eg 10 digits), you run a query where the number contains the provider prefix. Then you order by prefix length descending and by price ascending..
It is called least cost routing. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Gerry Jacobsen Sent: 2012-09-27 03:26 To: Commercial and Business-Oriented Asterisk Discussion Subject: [asterisk-biz] Algorithms for generating dialing codes and rates? Hello, is anyone aware of algorithms or software which can generate customer rate tables with dialing codes and rates from given provider rates - without having a predefined destination, dialing code table for customers ? Inputs: - several offers from providers with break-out codes and rates - parameter: maximum break-out code length - parameter: profit margin Output: - Customer rate table with breakout codes / destinations and rates Anyone? TIA Gerry -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-biz mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-biz -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-biz mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-biz
