Hi,<br><br><div class="gmail_quote">2009/11/13 Dmitri G. <span dir="ltr"><<a href="mailto:xbt.dev@gmail.com" target="_blank">xbt.dev@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi List,<br><br>I am using lcr with opensips (version 1.5.2), I have 3 voip products what I offer for my users.<br>Let's name it as "bronze", "silver" and "gold".<br><br>Each products have it's own lcr (with nearly the same prefixes, but with different gateways).<br>
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.<br><br>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.<br>
The customers are dial with prefixes, so 101+number will identify the call as "bronze", 102+number will be identified as "silver".<br><br>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)<br>
<a href="http://www.voipembedded.com/resources/openser_dbtext_lcr.cfg" target="_blank">http://www.voipembedded.com/resources/openser_dbtext_lcr.cfg</a><br><br>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.<br>
<br>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.<br>
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.<br><br>I hope somebody can suggest me a solution for this.<br>
<br>
Any help would be appreciated.<br><br><br>Thanks,<br><font color="#888888"><br>Dmitri<br> <br></font><br></blockquote>You can merge all tables into one.<br><br>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.<br>
<br>So if you have these prefixes (for example):<br><br>1244<br>1245<br>1246<br><br>will become<br><br>1011244<br>1011245<br>1011246<br><br>for the other package it will look like this in the same lcr table:<br><br>1021244<br>
1021245<br><br><br><br>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.<br>
<br>-Laszlo<br>
</div>