On 17/01/06, Jean-Michel Hiver <[EMAIL PROTECTED]> wrote: > Hi List, > > > I am working on least cost routing code on the moment, and I am > stumbling on a problem. > > Say you have provider A having: > > Prefix XXX 0.10 > Prefix XXXYYY 0.20 > > And provider B having > > Prefix XXX 0.15 > > > You're stuck, because you cannot decide if provider B's "XXX" prefix > also covers XXXYYY numbers or not. If it doesn't, it would be a waste to > try and contact it. Or maybe worse, you might be dialing a destination > which /does/ work but is not displayed in the rates list and could be > billed a lot more.
I guess you need to determine each provider's rate for the route in question separately using the 'longest first' algorithm, then compare the rates you've found. Deal with the 'doesn't cover routes not specifically listed' issue as an attribute of the provider. Or a dummy catch-all at $99.99/min which your code knows never to select. In the end, if the provider doesn't give sufficient information about their charges for routes not specifically listed, there's not much you can do... Peter -- Peter Bowyer Email: [EMAIL PROTECTED] Tel: +44 1296 768003 VoIP: sip:[EMAIL PROTECTED] VoIP: [EMAIL PROTECTED] FWD: **275*5048707000 VoipTalk: **473*5048707000 _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users