Mr. Lau, Send me the complete listing of the gnugk.ini file and the Call Log. I will debug it for you. My Guess is that the session H.323 variables data taypes are either not matching with the table column data types or the character widths. Do you know what are the data types and Widths for the following variables returned? gkname callnum, d_cause, sessid, H323id, setup_time, connect_time, disconnect_time, caller_ip, callee_ip, calling_number, caller_number -----Original Message----- From: openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx]On Behalf Of T. F. Lau Sent: Saturday, June 12, 2004 3:05 AM To: openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Subject: Tell me what I have done wrong Dear all, I'm new to SQL. I have tried to setup MySQL for authentication and it works fine. But when I set up the accounting part but it doesn't work. Is it because of any typo mistake or the way I define the SQL is incorrect? Can anybody tell me what I have done wrong and give me any advice? Anybody can give me an example will be appreciated. This is my configuration in the gnugk.ini [CallTable] GenerateNBCDR=1 GenerateUCCDR=0 DefaultCallDurationLimit=3600 [Gatekeeper::Auth] SimplePasswordAuth=optional;RRQ SQLPasswordAuth=optional;RRQ AliasAuth=optional;RRQ,ARQ SQLAliasAuth=required;RRQ default=allow [Gatekeeper::Acct] SQLAcct=alernative;start,update,stop FileAcct=suppicient;stop default=fail;start [Accounting] AlwaysUseCLID=1 [SQLAcct] Driver=MySQL Host=localhost:3306 Database=billing Username=gnugk Password=secret StartQuery=INSERT INTO call (gkname, callnum, d_cause, sessid, H323id, setup_time, connect_time, disconnect_time, caller_ip, callee_ip, calling_number, caller_number) VALUES ('%g', '%n', '%c', '%s', '%u', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{callee-ip}', '%{Calling-Station-Id}', '%{Caller-Station-Id}') StartQueryAlt=INSERT INTO call (gkname, callnum, duration, d_cause, sessid, H323id, setup_time, connect_time, disconnect_time, caller_ip, callee_ip, calling_number, caller_number) VALUES ('%g', '%n', '%d', '%c', '%s', '%u', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{callee-ip}', '%{Calling-Station-Id}', '%{Caller-Station-Id}') UpdateQuery=UPDATE call SET duration = %d WHERE gkname = '%g' AND sessid = '%s' StopQuery=UPDATE call SET duration = %d, disconnect_time = '%{disconnect-time}' WHERE gkname = '%g' AND sessid = '%s' StopQueryAlt=INSERT INTO call (gkname, callnum, d_cause, sessid, H323id, setup_time, connect_time, disconnect_time, caller_ip, callee_ip, calling_number, caller_number) VALUES ('%g', '%n', '%c', '%s', '%u', '%{setup-time}', '%{connect-time}', '%{disconnect-time}', '%{caller-ip}', '%{callee-ip}', '%{Calling-Station-Id}', '%{Caller-Station-Id}') [FileAcct] DetailFile=/var/log/gk/cdr.log Rotate=monthly RotateDay=31 RotateTime=23:59 The setting of MySQL is as follows: -- Host: localhost Database: billing -- ------------------------------------------------------ -- Server version 4.0.18 -- -- Table structure for table `call` -- CREATE TABLE call ( gkname varchar(16) NOT NULL default '', callnum decimal(6,0) NOT NULL default '0', duration decimal(5,0) NOT NULL default '0', d_cause decimal(16,0) NOT NULL default '0', sessid varchar(6) NOT NULL default '', H323id varchar(20) NOT NULL default '', setup_time varchar(30) NOT NULL default '', conect_time varchar(30) NOT NULL default '', disconnect_time varchar(100) NOT NULL default '', caller_ip varchar(15) NOT NULL default '', callee_ip varchar(15) NOT NULL default '', calling_number decimal(24,0) NOT NULL default '0', called_number decimal(24,0) NOT NULL default '0' ) TYPE=MyISAM; -- -- Dumping data for table `call` -- Have I done anything wrong? Please tell me. Thank you & best Rgds. T. F. Lau ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________________ 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 The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________________ List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_id?49 Homepage: http://www.gnugk.org/