<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&gt; select * from lcr;<br>+----+--------+---------------+--------+----------+<br>| id | prefix | from_uri&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | grp_id | priority |<br>+----+--------+---------------+--------+----------+<br>|&nbsp; 8 | 1303&nbsp;&nbsp; | @203.84.213.8 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | &lt;-- (Hong Kong)<br>| 10 |
 1303&nbsp;&nbsp; | @67.151.19.114|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | &lt;-- (USA)<br>+----+--------+---------------+--------+----------+<br><br>mysql&gt; select * from gw;<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>| id | gw_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; | grp_id | ip_addr&nbsp;&nbsp;&nbsp; | port | uri_scheme | transport | strip | prefix | dm | Priority<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>| 12 | TELEGLOBE_CH_HKG_01 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 1079401702 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 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<br>
| 17 | ARBINET_US_LGA_01 &nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | 3423099979 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp; 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&gt; select * from lcr;<br>+----+--------+----------------+--------+----------+<br>| id | prefix | from_uri&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | grp_id | priority |<br>+----+--------+----------------+--------+----------+<br>|&nbsp; 1 | 1303&nbsp;&nbsp; | @203.84.213.8&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br>|&nbsp; 2 |
 1303&nbsp;&nbsp; | @203.84.213.8&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | <br>|&nbsp; 3 | 1303&nbsp;&nbsp; | @203.84.213.8&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | <br>|&nbsp; 5 | 1303&nbsp;&nbsp; | @67.151.19.114 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | <br>|&nbsp; 6 | 1303&nbsp;&nbsp; | @67.151.19.114 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | <br>|&nbsp; 7 | 1303&nbsp;&nbsp; | @67.151.19.114 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | <br>+----+--------+----------------+--------+----------+<br><br>mysql&gt; select * from gw;<br>+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>
| id | gw_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; | grp_id | ip_addr&nbsp;&nbsp;&nbsp; | port | uri_scheme | transport | strip | prefix | dm |<br>
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+<br>
| 12 | TELEGLOBE_CH_HKG_01 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 1079401702 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |<br>
| 13 | VERIZON_CA_YTO_01 &nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | 3517395939 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |<br>
| 14 | ARBINET_CH_HKG_01&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 3423099979 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |<br>
| 15 | TELEGLOBE_US_LAX_01 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 | 3517395939 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |<br>

| 16 | VERIZON_CA_YTO_02 &nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 | 1079401702 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 1 |<br>

| 17 | ARBINET_US_LGA_01 &nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 | 3423099979 | 5060 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp; NULL | NULL&nbsp;&nbsp; |&nbsp; 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>