[OpenSIPS-Users] lcr- ideas?

Laszlo laszlo at voipfreak.net
Fri Nov 13 23:37:14 CET 2009


Hi,

2009/11/13 Dmitri G. <xbt.dev at gmail.com>

> Hi List,
>
> I am using lcr with opensips (version 1.5.2), I have 3 voip products what I
> offer for my users.
> Let's name it as "bronze", "silver" and "gold".
>
> Each products have it's own lcr (with nearly the same prefixes, but with
> different gateways).
> Basically the lcr will be different in each products, voip products are
> calculated based on asr and pdd, so "gold" will be the highest quality lcr.
>
> Each lcr contains various rows, from 5k to 130k rows (based on prefixes).
> 50% of the prefixes can be found in all 3 products.Every prefix in lcr table
> have multiple gateways with multiple priorities.
> The customers are dial with prefixes, so 101+number will identify the call
> as "bronze", 102+number will be identified as "silver".
>
> What will be the best way to route calls based on the dialed number? I am
> using a cfg file based on Ovidiu's example, so I have exactly the same like
> this(ok few things are changed to fit opensips 1.5.2)
> http://www.voipembedded.com/resources/openser_dbtext_lcr.cfg
>
> I mean when the customer dial 101+number, then the call will be routed
> based on the "bronze" lcr, when somebody else dial 102+number, then that
> will be routed based on the "silver" lcr.
>
> I am thinking about to run multiple opensips instances, each instance with
> it's own cfg file, so 1st instance ill run with using opensips.cfg, second
> one will run with opensips2.cfg and so on, so basically I'll run 3 instances
> with different cfg/pid files and with 3 different DBs + listen ports, first
> instance with "bronze" lcr, second one with "silver" lcr, third one wwith
> "gold" lcr.
> With this I can have 3 separate databases for the 3 instances, and I can
> have 3 different lcr tables, but I don't think it's the best way to do this.
>
> I hope somebody can suggest me a solution for this.
>
> Any help would be appreciated.
>
>
> Thanks,
>
> Dmitri
>
>
> You can merge all tables into one.

I'd add the dial prefixes to the prefixes in your lcr table, this way you
can have one lcr table. You can strip the dial prefixes in the gw table.

So if you have these prefixes (for example):

1244
1245
1246

will become

1011244
1011245
1011246

for the other package it will look like this in the same lcr table:

1021244
1021245



It will work nicely if you have prefixes with the same length, so if you add
10112445656, you can strip the first 3 digits in the gw table, then the call
will go out to your provider as 12445656.

-Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091113/7a6923dc/attachment.htm 


More information about the Users mailing list