[Asterisk-Users] How do you deal with subprefixes with LCR?

Peter Bowyer peeebeee at gmail.com
Tue Jan 17 23:24:53 MST 2006


On 17/01/06, Jean-Michel Hiver <jhiver at ykoz.net> 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: peter at bowyer.org
Tel: +44 1296 768003
VoIP: sip:peter at bowyer.org
VoIP: *5048707000 at sipbroker.com
FWD: **275*5048707000
VoipTalk: **473*5048707000



More information about the asterisk-users mailing list