[Asterisk-Dev] dev conf topic: better CDRs

Derrick D. Daugherty derrick+asterisk at blinky-lights.org
Wed Feb 23 13:53:56 MST 2005


Cracks in my tinfoil beanie around Wed, Feb 23, 2005 at 02:16:02PM -0600
allowed Matthew Boehm <mboehm at cytelcom.com> to seep these bits into my brain:
> I've already got CDRs off the asterisk box. They are being dumped into a
> dedicated mysql server. A problem that I am worried about is having multiple
> asterisk boxes writing CDRs to the same table.
> 
> Just exactly how unique is the unique id in a CDR? Is there a way to "seed"
> each server so that the random id is more random?

it's not unique enough.

channel.c:
snprintf(tmp->uniqueid, sizeof(tmp->uniqueid), "%li.%d", (long)time(NULL), uniqueint++);

either 
   o alter uniqueid definition to identify your proxy somehow 
   o use different tables 
   o add a cdrsrcproxyID column to a central table and alter how you write
     your cdrs to include that.

^D



More information about the asterisk-dev mailing list