Good morning everyone. I wonder if it is possible, without touching the source code, to Asterisk save the cdr with date in unix time instead of the default date. It's possible? Thanks in advance, -- Rodrigo Lang Opening your mind - Just another Open Source site<http://openingyourmind.wordpress.com/> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110210/d17c483d/attachment.htm>
Well. I suggest to use DB function instead of modifying asterisk source. You can add one additional column and write and after-insert trigger in your cdrs table which convert dattime to your required format and update the value of added column. From: Rodrigo Lang Sent: Thursday, February 10, 2011 5:13 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] CDR with unix time. Good morning everyone. I wonder if it is possible, without touching the source code, to Asterisk save the cdr with date in unix time instead of the default date. It's possible? Thanks in advance, -- Rodrigo Lang Opening your mind - Just another Open Source site -------------------------------------------------------------------------------- -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110210/050f0fa9/attachment.htm>
Just use uniqueid, which is exactly what you want. No modification is necessary. Regards, Mindaugas Kezys Kolmisoft UAB VoIP Billing Solutions e-mail: info at kolmisoft.com URL: http://www.kolmisoft.com Find us on Facebook <http://www.facebook.com/pages/Vilnius-Lithuania/Kolmisoft/106746839379147> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Rodrigo Lang Sent: Thursday, February 10, 2011 2:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] CDR with unix time. Good morning everyone. I wonder if it is possible, without touching the source code, to Asterisk save the cdr with date in unix time instead of the default date. It's possible? Thanks in advance, -- Rodrigo Lang Opening your mind - Just another Open Source site <http://openingyourmind.wordpress.com/> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110210/6900da05/attachment.htm>
On Thursday 10 February 2011 06:13:38 Rodrigo Lang wrote:> I wonder if it is possible, without touching the source code, to > Asterisk save the cdr with date in unix time instead of the default > date. It's possible?The answer is, it depends upon the backend version you're using. With cdr_pgsql and cdr_mysql from 1.6.2 forward, if the column type is integer or float, then the unix timestamp will be used. -- Tilghman