[asterisk-users] Simple CDRs

Dave Platt dplatt at radagast.org
Fri Jan 9 17:12:21 CST 2009


> I may be over simplifying but I would have a serial number object that 
> gets incremented anytime it is called and will be set to 0 at start-up. 
> I would then use it to generate a UUID like this:
> MAC.serialid.64bit timedate

I suggest reviewing RFC 4122, which discusses UUID formats in some
detail.

Your suggestion is very close to a standard "version 1" UUID, which
includes the host's MAC address, 60 bits of time information, and
a 14-bit "clock sequence value" (which is set randomly at startup,
and incremented if the system clock value is adjusted forwards or
backwards or if the node ID changes).

The time value has a 100-nanosecond resolution, which sets a lower
limit to the amount of time which may be allowed to pass between
UUID generation events.  By my math this field won't wrap until
after the year 5,000 C.E., so we have a while to prepare for the
"Y5237" wraparound problem :-)





More information about the asterisk-users mailing list