Hi Jan, Thanks for your reply.
Sorry, its typo. The actual version is 2.2.7 of gnugk. Thanks Tahir Bhutta Network Engineer DDI: +44 (0) 845 084 3015 Mobile: +44 (0) 75 150 16608 Fax: +44 (0) 845 084 3030 Video IP: 195.58.67.107 Video ISDN: +44 (0) 161 919 5519 Website: videonations.com Address: Unit 20, Edward Court, Altrincham Business Park, Altrincham, Cheshire, WA14 5GL This email and its contents are subject to our corporate disclaimer -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 08 October 2009 20:31 To: [email protected] Subject: Openh323gk-users Digest, Vol 41, Issue 3 Send Openh323gk-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/openh323gk-users or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Openh323gk-users digest..." Today's Topics: 1. Question on SQLite (Kim Cary) 2. Re: Question on SQLite (Jan Willamowius) 3. Re: GnuGK Proxy Issues. (Jan Willamowius) 4. Re: Routing calls to particular ISDN gateways based on source IP / E.164? (Robert Kulagowski) 5. Re: Routing calls to particular ISDN gateways based on source IP / E.164? (Jan Willamowius) 6. Re: Routing calls to particular ISDN gateways based on source IP / E.164? (Robert Kulagowski) 7. Re: Routing calls to particular ISDN gateways based on source IP / E.164? (Jan Willamowius) 8. Re: Routing calls to particular ISDN gateways based on source IP / E.164? (Robert Kulagowski) ---------------------------------------------------------------------- Message: 1 Date: Wed, 7 Oct 2009 16:41:20 -0700 From: Kim Cary <[email protected]> Subject: [Openh323gk-users] Question on SQLite To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" In a little bit, we'll be updating to the MacOSX binary for 2.2.8, with SQLite. I'd like to get some call accounting going (we use gnugk for H323 videoconferencing) so we can have some stats. I was looking around for a sample schema for SQLite, but didn't find one. I figure I can crack that together, tho. How does this look for a SQLite accounting config, assuming a database of gnugkstats with table "call"? In particular, I'm concerned about the Database directive... I've never worked with SQLite, but I assume you have to provide a patch (or separate conf file) to say where the gnugkstatsdb is located, since there is no server process. Here goes nothing: [Gatekeeper::Acct] SQLAcct=optional;start,stop,update [SQLAcct] Driver=SQLite Database=/var/sqlite/gkstatsdb Usersname=gnugk Password=Secret Startquery=INSERT INTO call (gkname, sessid, username, calling, called) VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}')' UpdateQuery=UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = '%s' StopQuery=PDATE call SET duration = %d, dtime = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s' -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Thu, 8 Oct 2009 14:46:54 +0200 From: Jan Willamowius <[email protected]> Subject: Re: [Openh323gk-users] Question on SQLite To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII Hi Kim, SQLite will create a file for the database when you create the schema and you just point to it from the GnuGk config: Driver=SQLite Database=/var/sqlite/gkstatsdb.db Username and Password are ignored for SQLite. Regards, Jan Kim Cary wrote: > In a little bit, we'll be updating to the MacOSX binary for 2.2.8, with > SQLite. I'd like to get some call accounting going (we use gnugk for H323 > videoconferencing) so we can have some stats. > > I was looking around for a sample schema for SQLite, but didn't find one. I > figure I can crack that together, tho. > > How does this look for a SQLite accounting config, assuming a database of > gnugkstats with table "call"? In particular, I'm concerned about the > Database directive... I've never worked with SQLite, but I assume you have > to provide a patch (or separate conf file) to say where the gnugkstatsdb is > located, since there is no server process. > > Here goes nothing: > > [Gatekeeper::Acct] > SQLAcct=optional;start,stop,update > > [SQLAcct] > Driver=SQLite > Database=/var/sqlite/gkstatsdb > Usersname=gnugk > Password=Secret > Startquery=INSERT INTO call (gkname, sessid, username, calling, called) > VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', > '%{Called-Station-Id}')' > UpdateQuery=UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = > '%s' > StopQuery=PDATE call SET duration = %d, dtime = '%{disconnect-time}' WHERE > gkname = '%g' AND sessid = '%s' -- Jan Willamowius, [email protected], http://www.gnugk.org/ ------------------------------ Message: 3 Date: Thu, 8 Oct 2009 14:51:21 +0200 From: Jan Willamowius <[email protected]> Subject: Re: [Openh323gk-users] GnuGK Proxy Issues. To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII Hi Tahir, there never was a 2.2.9 release.... Regards, Jan Tahir Bhutta wrote: > Hi All, > > > > I am having a strange issue with Gnugk version 2.2.9 running on debian > Linux. > > > > The box has been working fine for more than a year in proxy mode. > > > > But all of a sudden, it starts responding on NAT public address when the > internal NATed endpoints trying to register. It should reply on private > ip address for internal endpoints. > > > > Thanks. > > > > Tahir Bhutta > Network Engineer > > > > > > > > > > > > DDI: > > +44 (0) 845 084 3015 > > > > Mobile: > > +44 (0) 75 150 16608 > > > > Fax: > > +44 (0) 845 084 3030 > > > > Video IP: > > 195.58.67.107 > > > > Video ISDN: > > +44 (0) 161 919 5519 > > > > Website: > > videonations.com <http://www.videonations.com/wb/pages/home.php> > > > > Address: > > Unit 20, Edward Court, Altrincham Business Park, Altrincham, Cheshire, > WA14 5GL > > > > This email and its contents are subject to our corporate disclaimer > <http://www.videonations.com/wb/pages/home/email-disclaimer.php> > > > > > -- Jan Willamowius, [email protected], http://www.gnugk.org/ ------------------------------ Message: 4 Date: Thu, 08 Oct 2009 10:19:46 -0500 From: Robert Kulagowski <[email protected]> Subject: Re: [Openh323gk-users] Routing calls to particular ISDN gateways based on source IP / E.164? To: GNU Gatekeeper Users <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed > 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 > "[email protected]", what's going to be in the %r field and > what's going to be in the %{Calling-Station-Id} ? I ended up doing this: QUERY=SELECT gatewayip from routes where calling=left(substring_index('%r','=',-1),2) because the %r being passed from the Polycom endpoint comes through as "[email protected]=213538" to the SQL query, I ended up using the above query. The substring_index gives me everything to the right of the first = sign, and then I'm taking the left two characters (site code) as the lookup. But then I tried QUERY=SELECT gatewayip from routes where calling=left('%{Calling-Station-Id}',2) and that's working even better, because I'm just getting the 6-digit e.164 number and don't need as much fancy parsing. So, yay! ------------------------------ Message: 5 Date: Thu, 8 Oct 2009 17:34:44 +0200 From: Jan Willamowius <[email protected]> Subject: Re: [Openh323gk-users] Routing calls to particular ISDN gateways based on source IP / E.164? To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII Thats pretty much what I roughly had in mind. But now for extra credit: ;-) Right now you only return the preferred gateway IP. You should modify your SQL to return the other gateway IPs in the next rows so the call will failover to those when the preferred gateway isn't available. Regards, Jan Robert Kulagowski wrote: > > 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 > > "[email protected]", what's going to be in the %r field and > > what's going to be in the %{Calling-Station-Id} ? > > I ended up doing this: > QUERY=SELECT gatewayip from routes where > calling=left(substring_index('%r','=',-1),2) > > because the %r being passed from the Polycom endpoint comes through as > "[email protected]=213538" to the SQL query, I ended up using the > above query. The substring_index gives me everything to the right of the > first = sign, and then I'm taking the left two characters (site code) as > the lookup. > > But then I tried > QUERY=SELECT gatewayip from routes where > calling=left('%{Calling-Station-Id}',2) > > and that's working even better, because I'm just getting the 6-digit e.164 > number and don't need as much fancy parsing. > > So, yay! -- Jan Willamowius, [email protected], http://www.gnugk.org/ ------------------------------ Message: 6 Date: Thu, 08 Oct 2009 11:15:41 -0500 From: Robert Kulagowski <[email protected]> Subject: Re: [Openh323gk-users] Routing calls to particular ISDN gateways based on source IP / E.164? To: GNU Gatekeeper Users <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Jan Willamowius wrote: > Thats pretty much what I roughly had in mind. > > But now for extra credit: ;-) > Right now you only return the preferred gateway IP. You should modify > your SQL to return the other gateway IPs in the next rows so the call > will failover to those when the preferred gateway isn't available. Isn't it doing that already? mysql> select * from routes; +-------------+--------+-------+-------------+--------+---------+ | gatewayip | prefix | route | destination | called | calling | +-------------+--------+-------+-------------+--------+---------+ | 10.244.22.5 | NULL | NULL | NULL | NULL | 21 | | 10.244.22.5 | NULL | NULL | NULL | NULL | 22 | | 10.244.2.5 | NULL | NULL | NULL | NULL | 31 | | 10.244.22.5 | NULL | NULL | NULL | NULL | 31 | +-------------+--------+-------+-------------+--------+---------+ 4 rows in set (0.00 sec) mysql> select gatewayip from routes where calling="31"; +-------------+ | gatewayip | +-------------+ | 10.244.2.5 | | 10.244.22.5 | +-------------+ 2 rows in set (0.00 sec) And then in the log I see: 2009/10/08 10:42:23.809 5 gksql.cxx(388) SqlPolicy Executing query: SELECT gatewayip from routes where c alling=left('310339',2) 2009/10/08 10:42:23.809 5 Routing.cxx(1654) SqlPolicy Query result : 10.244.2.5 2009/10/08 10:42:23.809 5 Routing.cxx(1674) SqlPolicy Result cont'd: 10.244.22.5 If I read the docs correctly, wouldn't it automatically try 10.244.22.5 if 10.244.2.5 isn't available? ------------------------------ Message: 7 Date: Thu, 8 Oct 2009 20:49:00 +0200 From: Jan Willamowius <[email protected]> Subject: Re: [Openh323gk-users] Routing calls to particular ISDN gateways based on source IP / E.164? To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII Robert Kulagowski wrote: > Jan Willamowius wrote: > > Thats pretty much what I roughly had in mind. > > > > But now for extra credit: ;-) > > Right now you only return the preferred gateway IP. You should modify > > your SQL to return the other gateway IPs in the next rows so the call > > will failover to those when the preferred gateway isn't available. > > Isn't it doing that already? Sorry, I didn't see that you had multiple entries for some prefixes. For those where you have multiple entries, GnuGk will of course do failover. > mysql> select * from routes; > +-------------+--------+-------+-------------+--------+---------+ > | gatewayip | prefix | route | destination | called | calling | > +-------------+--------+-------+-------------+--------+---------+ > | 10.244.22.5 | NULL | NULL | NULL | NULL | 21 | > | 10.244.22.5 | NULL | NULL | NULL | NULL | 22 | > | 10.244.2.5 | NULL | NULL | NULL | NULL | 31 | > | 10.244.22.5 | NULL | NULL | NULL | NULL | 31 | > +-------------+--------+-------+-------------+--------+---------+ > 4 rows in set (0.00 sec) > > mysql> select gatewayip from routes where calling="31"; > +-------------+ > | gatewayip | > +-------------+ > | 10.244.2.5 | > | 10.244.22.5 | > +-------------+ > 2 rows in set (0.00 sec) I didn't expect multiple entries from that query, because you don't have an 'order by' clause. If you don't have one, the order in which the entries are returned is not defined and may change over time. So you should add something like a priority column that you order by. Regards, Jan -- Jan Willamowius, [email protected], http://www.gnugk.org/ ------------------------------ Message: 8 Date: Thu, 08 Oct 2009 14:31:02 -0500 From: Robert Kulagowski <[email protected]> Subject: Re: [Openh323gk-users] Routing calls to particular ISDN gateways based on source IP / E.164? To: GNU Gatekeeper Users <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Jan Willamowius wrote: > I didn't expect multiple entries from that query, because you don't > have an 'order by' clause. If you don't have one, the order in which > the entries are returned is not defined and may change over time. So > you should add something like a priority column that you order by. I'll be extending the schema and giving it another try. Can you detail what sorts of fields can be queried/used? I kind of guessed that "calling" would work based on the examples, but I wasn't sure. ------------------------------ ------------------------------------------------------------------------ ------ 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 ------------------------------ _______________________________________________ Openh323gk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openh323gk-users End of Openh323gk-users Digest, Vol 41, Issue 3 *********************************************** ------------------------------------------------------------------------------ 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:[email protected] 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/

