Hi, oh, sorry it's here:
[Gatekeeper::Acct] SQLAcct=optional;start,stop,update FileAcct=optional;start,stop,update
[FileAcct] DetailFile=/var/log/gk/cdr.log Rotate=0
[SQLAcct] Driver=MySQL Host=ns.clnet.cz Database=gnugk User=gnugk Password=<pass>
StartQuery=INSERT INTO billing (gkname, sessid, username, calling, called) VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}')
UpdateQuery=UPDATE billing SET duration = %d WHERE gkname = '%g' AND sessid = '%s'
StopQuery=UPDATE billing SET duration = %d, dtime = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s'
StopQueryAlt=INSERT INTO billing (gkname, sessid, username, calling, called, duration) VALUES ('%g', '%s', '%u', '%{Calling-Station-Id}', '%{Called-Station-Id}', %d)
but SQL still not work... work only storing into file...
Thanks
Marian Rychtecký CLNET s.r.o. marian@xxxxxxx Tel. +420 724 397 441
Na Pe(?ine( 281 405 05 De(c(ín, Czech Republic http://www.mari.cz
Zygmuntowicz Michal napsal(a):
Where is your [Gatekeeper::Acct] section? You need this section to tell the gatekeeper that it should enable SQLAcct module.
Marian Rychtecky <marian@xxxxxxx> wrote:
can you help me please with configuration GnuGK witch doesn\'t store calls into MySQL database :-( ?
I have already configured GNUGK to authorize via MySQL and this work fine, but accounting make no SQL query to our SQL server.
Here is rou ini-file:
[Gatekeeper::Main] Fourtytwo=42 Name=CLNET_GateKeeper
[Gatekeeper::Auth] MySQLPasswordAuth=optional;RRQ,ARQ MySQLAliasAuth=sufficient;RRQ
[MySQLAuth] Host=ns.clnet.cz Database=gnugk User=gnugk Password=<pass> Table=customer IDField=id_cust PasswordField=Password
[MySQLAliasAuth] Host=ns.clnet.cz Database=gnugk User=gnugk Password=<pass> Table=customer IDField=id_cust IPField=IPAddress
[Password] PasswordTimeout=0 KeyFilled=123
[RoutedMode] GKRouted=1 H245Routed=1 SupportNATedEndpoints=1
[Accounting] AlwaysUseCLID=1
[SQLAcct]
Driver=MySQL
Host=ns.clnet.cz
Database=gnugk
User=gnugk
Password=<pass>
StartQuery=INSERT INTO billing (gkname, sessid, username, calling, called) VALUES (\'%g\', \'%s\', \'%u\', \'%{Calling-Station-Id}\', \'%{Called-Station-Id}\')
UpdateQuery=UPDATE billing SET duration = %d WHERE gkname = \'%g\' AND sessid = \'%s\'
StopQuery=UPDATE billing SET duration = %d, dtime = \'%{disconnect-time}\' WHERE gkname = \'%g\' AND sessid = \'%s\'
StopQueryAlt=INSERT INTO billing (gkname, sessid, username, calling, called, duration) VALUES (\'%g\', \'%s\', \'%u\', \'%{Calling-Station-Id}\', \'%{Called-Station-Id}\', %d)
[RasSrv::GWPrefixes] inalpG1=2,3,4,5,6,7,8
[RasSrv::RewriteE164] 00=0 01=1 02=2 03=3 04=4 05=5 06=6 07=7 08=8 09=9
many thanks in advance - Marian
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________________
List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549 Homepage: http://www.gnugk.org/
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id?66&opÌk
_______________________________________________________
List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_id?49 Homepage: http://www.gnugk.org/