[asterisk-users] CDR with unix time.

Robert Thomas thomcr at gmail.com
Wed Feb 16 19:06:03 CST 2011


What module are you using?

I have the cdr_mysql_addon.so module, and I can define alias for the
collums. I have an alias for start and end variable, and they both get
recorded as Unix EPOCH integers values on mysql. In Asterisk1.8 the collum
duration and billsec have milisec durations if you include the hrtimers
option.



On Sun, Feb 13, 2011 at 6:59 PM, Tilghman Lesher <tilghman at meg.abyt.es>wrote:

> On Thursday 10 February 2011 12:33:40 Rodrigo Lang wrote:
> > 2011/2/10 Tilghman Lesher <tilghman at meg.abyt.es>
> >
> > > 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.
> >
> > Without any modification? Only with the column type, Asterisk will
> > modify the common date to unix time?
>
> The idea behind this is that we don't want to lose any information.  Thus,
> if the datatype is numeric, then the only way to ensure that we don't lose
> information during the insert is to set the data to a unixtime format.
> Note that we can even store fractions of a second in this way, if the
> column type supports it (i.e. decimal or float).
>
> --
> Tilghman
>
> --
> _____________________________________________________________________
> -- 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
>



-- 
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110216/8a80f45c/attachment.htm>


More information about the asterisk-users mailing list