<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>Can anyone tell me why gateways in LCR don't have a priority?<br><br>We have multiple POP's where we originate calls from. The ITSP's that we send these calls to ALSO have multiple POP's. Choosing the best gateway isn't just a matter of choosing the least cost... It's also a matter of choosing the closest POP for that ITSP. <br><br>Being able to set a priority for each gateway means I could do this...<br><br>mysql> select * from lcr;<br>+----+--------+---------------+--------+----------+<br>| id | prefix | from_uri | grp_id | priority |<br>+----+--------+---------------+--------+----------+<br>| 8 | 1303 | @203.84.213.8 | 1 | 1 | <-- (Hong Kong)<br>| 10 |
1303 | @67.151.19.114| 2 | 1 | <-- (USA)<br>+----+--------+---------------+--------+----------+<br><br>mysql> select * from gw;<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>| id | gw_name | grp_id | ip_addr | port | uri_scheme | transport | strip | prefix | dm | Priority<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>| 12 | TELEGLOBE_CH_HKG_01 | 1 | 1079401702 | 5060 | 1 | 1 | NULL | NULL | 1 | 1<br>| 13 | VERIZON_CA_YTO_01 | 1 | 3517395939 |
5060 | 1 | 1 | NULL | NULL | 1 | 2<br>| 14 | ARBINET_CH_HKG_01 | 1 | 3423099979 | 5060 | 1 | 1 | NULL | NULL | 1 | 3<br>| 15 | TELEGLOBE_US_LAX_01 | 2 | 3517395939 | 5060 | 1 | 1 | NULL | NULL | 1 | 1<br>
| 16 | VERIZON_CA_YTO_02 | 2 | 1079401702 | 5060 | 1 | 1 | NULL | NULL | 1 | 2<br>
| 17 | ARBINET_US_LGA_01 | 2 | 3423099979 | 5060 | 1 | 1 | NULL | NULL | 1 | 3<br>
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>
<br>As you can see here, for calls to to prefix 1303 from 203.84.213.8(Hong Kong), we'd send calls to gateways TELEGLOBE_CH_HKG_01, VERIZON_CA_YTO_01 and ARBINET_CH_HKG_01 in that order. For calls to 1303 from 67.151.19.114(the US), we'd send calls to the same our ITSP's in the same order, but use gateways in different POPS, TELEGLOBE_US_LAX_01, VERIZON_CA_YTO_02, ARBINET_US_LGA_01.<br><br>What's really important here is that the choice of gateway for the cheapest ITSP can be modified to suit the location.<br><br>Now, WITHOUT the priority, I have to do THIS instead...<br><br>mysql> select * from lcr;<br>+----+--------+----------------+--------+----------+<br>| id | prefix | from_uri | grp_id | priority |<br>+----+--------+----------------+--------+----------+<br>| 1 | 1303 | @203.84.213.8 | 1 | 1 | <br>| 2 |
1303 | @203.84.213.8 | 2 | 2 | <br>| 3 | 1303 | @203.84.213.8 | 3 | 3 | <br>| 5 | 1303 | @67.151.19.114 | 4 | 1 | <br>| 6 | 1303 | @67.151.19.114 | 5 | 2 | <br>| 7 | 1303 | @67.151.19.114 | 6 | 3 | <br>+----+--------+----------------+--------+----------+<br><br>mysql> select * from gw;<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>
| id | gw_name | grp_id | ip_addr | port | uri_scheme | transport | strip | prefix | dm |<br>
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>
| 12 | TELEGLOBE_CH_HKG_01 | 1 | 1079401702 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
| 13 | VERIZON_CA_YTO_01 | 2 | 3517395939 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
| 14 | ARBINET_CH_HKG_01 | 3 | 3423099979 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
| 15 | TELEGLOBE_US_LAX_01 | 4 | 3517395939 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
| 16 | VERIZON_CA_YTO_02 | 5 | 1079401702 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
| 17 | ARBINET_US_LGA_01 | 6 | 3423099979 | 5060 | 1 | 1 | NULL | NULL | 1 |<br>
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br><br>As you can see, solution 1 requires LESS columns in the database. What other options do I have? I guess I could create separate lcr and gw tables for every POP we have... yuck.<br><br><span>Unfortunately, there is no priority column in the gateway table. :( I see someone else asked about it a while ago... <a target="_blank" href="http://www.mail-archive.com/devel@openser.org/msg06757.html">http://www.mail-archive.com/devel@openser.org/msg06757.html</a></span><br><br>Doug.<br><br><br><br><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>