[OpenSER-Users] LCR Gateway Priority....

Douglas Garstang dougmig33 at yahoo.com
Mon Mar 24 01:19:26 CET 2008


Can anyone tell me why gateways in LCR don't have a priority?

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. 

Being able to set a priority for each gateway means I could do this...

mysql> select * from lcr;
+----+--------+---------------+--------+----------+
| id | prefix | from_uri      | grp_id | priority |
+----+--------+---------------+--------+----------+
|  8 | 1303   | @203.84.213.8 |      1 |        1 | <-- (Hong Kong)
| 10 | 1303   | @67.151.19.114|      2 |        1 | <-- (USA)
+----+--------+---------------+--------+----------+

mysql> select * from gw;
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+
| id | gw_name             | grp_id | ip_addr    | port | uri_scheme | transport | strip | prefix | dm | Priority
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+
| 12 | TELEGLOBE_CH_HKG_01 |      1 | 1079401702 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     1
| 13 | VERIZON_CA_YTO_01   |      1 | 3517395939 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     2
| 14 | ARBINET_CH_HKG_01   |      1 | 3423099979 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     3
| 15 | TELEGLOBE_US_LAX_01 |      2 | 3517395939 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     1
| 16 | VERIZON_CA_YTO_02   |      2 | 1079401702 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     2
| 17 | ARBINET_US_LGA_01   |      2 | 3423099979 | 5060 |          1 |         1 |  NULL | NULL   |  1 |     3
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+

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.

What's really important here is that the choice of gateway for the cheapest ITSP can be modified to suit the location.

Now, WITHOUT the priority, I have to do THIS instead...

mysql> select * from lcr;
+----+--------+----------------+--------+----------+
| id | prefix | from_uri       | grp_id | priority |
+----+--------+----------------+--------+----------+
|  1 | 1303   | @203.84.213.8  |      1 |        1 | 
|  2 | 1303   | @203.84.213.8  |      2 |        2 | 
|  3 | 1303   | @203.84.213.8  |      3 |        3 | 
|  5 | 1303   | @67.151.19.114 |      4 |        1 | 
|  6 | 1303   | @67.151.19.114 |      5 |        2 | 
|  7 | 1303   | @67.151.19.114 |      6 |        3 | 
+----+--------+----------------+--------+----------+

mysql> select * from gw;
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+
| id | gw_name             | grp_id | ip_addr    | port | uri_scheme | transport | strip | prefix | dm |
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+
| 12 | TELEGLOBE_CH_HKG_01 |      1 | 1079401702 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
| 13 | VERIZON_CA_YTO_01   |      2 | 3517395939 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
| 14 | ARBINET_CH_HKG_01   |      3 | 3423099979 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
| 15 | TELEGLOBE_US_LAX_01 |      4 | 3517395939 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
| 16 | VERIZON_CA_YTO_02   |      5 | 1079401702 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
| 17 | ARBINET_US_LGA_01   |      6 | 3423099979 | 5060 |          1 |         1 |  NULL | NULL   |  1 |
+----+---------------------+--------+------------+------+------------+-----------+-------+--------+----+

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.

Unfortunately, there is no priority column in the gateway table. :( I see someone else asked about it a while ago... http://www.mail-archive.com/devel@openser.org/msg06757.html

Doug.








      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080323/3fe8ca2c/attachment.htm 


More information about the Users mailing list