<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:10pt"><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 10pt;">&gt;<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">&gt;Douglas 
Garstang 
writes:<br>&gt;<br> 
&gt;&gt; 
I'm 
surprised 
no 
one 
has 
written 

better 
module 
for 
this. 
In 
the<br> 
&gt;&gt; 
realworld, 
you 
have 
multiple 
POPs, 
your 
carriers 
also 
have 
multiple<br> 
&gt;&gt; 
POP's,multiple 
gateways. 
In 
the 
event 
you 
get 

failure 
with 
one<br> 
&gt;&gt; 
carrier, 
youprobably 
want 
to 
switch 
to 
the 
next 
cheapest 
carrier, 
not<br> 
&gt;&gt; 
anothergateway 
within 
the 
same 
carrier 
(as 
it 
will 
probably 
just 
fail<br>&gt;&gt; 
again).When 
selecting 

carrier 
gateway, 
you 
need 
to 
choose 
the 
best<br> 
&gt;&gt; 
POP 
touse 
before 
you 
select 
the 
trunk.<br>&gt;<br>&gt;it 
might 
be 
possible 
for 
you 
to 
achieve 
what 
you 
describe 
using 
existing<br>&gt;lcr 
module 
by 
having 
only 
one 
gw 
per 
group 
and 
then 
assign 
priorities 
in<br>&gt;lcr 
table 
in 
such 

way 
that 
for 
prefix 
+xx 
highest 
priority 
is 
gw 
group<br>&gt;1 
of 
the 
cheapest 
carrier, 
then 
gw 
group 

of 
second 
cheapest 
carrier,<br>&gt;then 
gw 
group 

of 
cheapest 
carrier 
and 
finally 
gw 
group 

of 
second<br>&gt;cheapest 
carrier 
(assuming 
two 
carriers 
serving 
+xx).<br><br>Juha,<br><br>Thanks. I went through that option yesterday. As we have 6 instances of OpenSER running, I would need to have SIX routes defined in the lcr table for a single prefix. For example (IP's modified):<br><br><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">mysql&gt; select * from lcr;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">+----+--------+---------------+--------+----------+</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">| id | prefix | from_uri&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | grp_id | priority |</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">+----+--------+---------------+--------+----------+</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">|&nbsp; 8 | 1303&nbsp;&nbsp; | @203.84.213.8 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">|&nbsp; 9 | 1303&nbsp;&nbsp; | @</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">203.84.214.8</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br></span></font><font size="2"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">| 10 | 1303&nbsp;&nbsp; | @</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">203.84.215.8</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br></span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">| 11 | 1303&nbsp;&nbsp; | @</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">203.84.216.8</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br></span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">| 12 | 1303&nbsp;&nbsp; |
 @</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">203.84.217.8</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br></span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">| 14 | 1303&nbsp;&nbsp; | @</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">203.84.218.8</span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | </span></font><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">+----+--------+---------------+--------+----------+</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></font><br>.... All that .... six rows for a single prefix. Of course, we have thousands of routes for each of our providers... off the top of my head, we have about 17,000 routes between Teleglobe and Verizon... multiply that by 6 and you have almost 120,000 routes. Apart from the administrative hassle, can OpenSER handle 120,000+ routes in the lcr table ok?<br><br>Our providers also have sometimes have several gateways in a single POP. However, we don't want to actually try and route calls to every single gateway in a POP, just a few of them. The LCR module doesn't seem to have a way to skip to the next lcr route. Can it do that? If it can't, we have to try every single gateway in a POP before skipping to the next carrier, which just isn't feesible.<br><br>Doug.<br><br><br>-- 
juha<br><br></div><br></div></div><br>
      <hr size=1>Looking for last minute shopping deals? <a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping"> 
Find them fast with Yahoo! Search.</a></body></html>