Jan Willamowius wrote: > Hi, > > you can set easily set priorities on your gateways and if you had one > GnuGk in each city, it would let calls go to the local gateway and only > use the remote ones in case the local gateway isn't available. > > But since you have all your devices on one central gatekeeper, they > will all see the same priority settings and thus use the same gateway. > > You could use the 'vqueue' routing policy to write a simple script to > do this or maybe even the 'sql' policy. I'm still trying to digest huge chunks of how to do things in GnuGk, and I'm not having much luck. Could you provide a short example or how this could be done? I'm looking at the Routing::SQL portion as the most flexible, but here are my questions. There doesn't appear to be a defined schema for "routes" that I can find, so I tried my own, below. What would be the valid fields and sizes to use? There are a few things that I know about the endpoints in the various cities. All units will always start their IP's with "10.244", where the 3rd octet is the IP sitecode, so "2" for NY, "21" for Chicago, etc. All units at a site with have a 6-digit e.164; "21" for Chicago, "31" for NY, etc. IP address of the gateway is always going to be 10.244.x.5. Should the following work? mysql> use gnugk; Database changed mysql> create table routes ( -> gatewayip varchar(20), -> prefix varchar(20), -> route varchar(20), -> destination varchar(20), -> called varchar(30), -> calling varchar(40)); Query OK, 0 rows affected (0.01 sec) mysql> describe routes; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | gatewayip | varchar(20) | YES | | NULL | | | prefix | varchar(20) | YES | | NULL | | | route | varchar(20) | YES | | NULL | | | destination | varchar(20) | YES | | NULL | | | called | varchar(30) | YES | | NULL | | | calling | varchar(40) | YES | | NULL | | +-------------+-------------+------+-----+---------+-------+ 6 rows in set (0.00 sec) mysql> insert into routes (gatewayip,calling) values('10.244.22.5','21'); Query OK, 1 row affected (0.00 sec) mysql> insert into routes (gatewayip,calling) values('10.244.22.5','22'); Query OK, 1 row affected (0.00 sec) mysql> insert into routes (gatewayip,calling) values('10.244.2.5','31'); Query OK, 1 row affected (0.00 sec) mysql> select gatewayip from routes where calling like '21'; +-------------+ | gatewayip | +-------------+ | 10.244.22.5 | +-------------+ 1 row in set (0.00 sec) mysql> select gatewayip from routes where calling like '31'; +------------+ | gatewayip | +------------+ | 10.244.2.5 | +------------+ 1 row in set (0.00 sec) mysql> insert into routes (gatewayip,calling) values('10.244.22.5','31'); Query OK, 1 row affected (0.00 sec) mysql> select gatewayip from routes where calling like '31'; +-------------+ | gatewayip | +-------------+ | 10.244.2.5 | | 10.244.22.5 | +-------------+ 2 rows in set (0.00 sec) So would the following work as the SQL SELECT statement? SELECT gatewayip from routes where calling=left('%r',2) Also, it seems like I can add a priority field to the table so that the gatewayip can vary as well? If the e.164 of the unit is 212345 and the h.323 name is "chicago-polycom@xxxxxxxxxxx", what's going to be in the %r field and what's going to be in the %{Calling-Station-Id} ? Thanks. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________________ Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users Homepage: http://www.gnugk.org/