What module are you using?<div><br></div><div>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.</div>
<div><br></div><div><br><br><div class="gmail_quote">On Sun, Feb 13, 2011 at 6:59 PM, Tilghman Lesher <span dir="ltr">&lt;<a href="mailto:tilghman@meg.abyt.es">tilghman@meg.abyt.es</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thursday 10 February 2011 12:33:40 Rodrigo Lang wrote:<br>
&gt; 2011/2/10 Tilghman Lesher &lt;<a href="mailto:tilghman@meg.abyt.es">tilghman@meg.abyt.es</a>&gt;<br>
&gt;<br>
&gt; &gt; On Thursday 10 February 2011 06:13:38 Rodrigo Lang wrote:<br>
&gt; &gt; &gt; I wonder if it is possible, without touching the source code, to<br>
&gt; &gt; &gt; Asterisk save the cdr with date in unix time instead of the default<br>
&gt; &gt; &gt; date. It&#39;s possible?<br>
&gt; &gt;<br>
&gt; &gt; The answer is, it depends upon the backend version you&#39;re using.  With<br>
&gt; &gt; cdr_pgsql and cdr_mysql from 1.6.2 forward, if the column type is<br>
&gt; &gt; integer or float, then the unix timestamp will be used.<br>
&gt;<br>
&gt; Without any modification? Only with the column type, Asterisk will<br>
&gt; modify the common date to unix time?<br>
<br>
</div>The idea behind this is that we don&#39;t want to lose any information.  Thus,<br>
if the datatype is numeric, then the only way to ensure that we don&#39;t lose<br>
information during the insert is to set the data to a unixtime format.<br>
Note that we can even store fractions of a second in this way, if the<br>
column type supports it (i.e. decimal or float).<br>
<div><div></div><div class="h5"><br>
--<br>
Tilghman<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Robert<br>
</div>