RE: How to store h323-setup-time, h323-connect-time, h323-disconnect-time into MySQL v4.x as DATETIME type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If MySQL version <= 4 supported Store Procedures one could be able to parse out the date and convert to a DATETIME MySQL type very easily. MySQL 5 is suppose to support SPs.

One could also possibly look at the available date time and string functions MySQL supports and try creating a query that would do this for you. But this to me seems like a lot of overhead in my opinion.

Perhaps we should have a new parameter in the [FileAcct] section called CDRDateFormat. In here we specify the date format we would like our CDRs to have. For example, like CDRDateFormat=yyyy-MM-dd  hhmmss or any format desired.

Freddy

-----Original Message-----
From: openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx]On Behalf Of Daniel Liu
Sent: Thursday, September 09, 2004 6:59 AM
To: openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Subject:  How to store h323-setup-time, h323-connect-time, h323-disconnect-time into MySQL v4.x as DATETIME type


Dear all,
I am using gnugk v2.0.8 release.
How can I store h323-setup-time, h323-connect-time, h323-disconnect-time into MySQL v4.x as DATETIME type?
MySQL do not like this format "'18:56:34.000 HKT Thu Sep 09 2004".

2004/09/09 18:56:34.356 2         RasTbl.cxx(2005)  CallTable::Insert(CALL) Call No. 1, total sessions : 1
2004/09/09 18:56:34.357 5          gksql.cxx(338)   SQLAcct Executing query: INSERT INTO offnet_cdrs (GatekeeperName, CallNumber, AcctSessionId, H323CallingId, H323CallId, H323ConfId, Q931SetupTime, CallerIP, CallerPort, CalleeIP, CalleePort, SrcInfo, DestInfo, CallingStationId, CalledStationId) VALUES ('GK1', '1', '414036db00000001', '671', '41 34 6e 8c 00 f1 18 10 83 a9 00 e0 4c eb 23 cc', '41 34 6e 8c 00 f1 18 10 83 aa 00 e0 4c eb 23 cc', '18:56:34.000 HKT Thu Sep 09 2004', '192.168.0.4','19900','192.168.0.28','1720','671:dialedDigits','16998771:dialedDigits','671', '16998771')
2004/09/09 18:56:34.360 3         gkacct.cxx(884)   GKACCT  SQLAcct logged event 1 for call no. 1
2004/09/09 18:56:34.360 2         gkacct.cxx(924)   GKACCT  Successfully logged event 1 for call no. 1

NHS甸???u?nZ???B健店?'au???练*?y适?l?女K????v?w??


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

_______________________________________________________

List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id?9
Homepage: http://www.gnugk.org/


[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux