Time in new CDR records

Marc Mohring

Silver Partner
Advanced Certified
Joined
May 11, 2017
Messages
31
Reaction score
1
We have some customers who are really keen on using the new CDR's to build their own reporting tools in PowerBI.
So, to get ready for their questions, I've installed the new version 6 RC.

Managed to get the new CDR's to come in to PowerBI using a connection to PostgreSQL server.
Data is coming in ok.

But, I can't figure out how to get the time of the call from the new CDR's.

The blog post explaining the new CDR's says it's "A 16-character, zero-padded, hexadecimal representation of the UTC timestamp since the epoch".

So, if this is my cdr_id {00000000-01DB-C391-9E82-7F1A000001FF} I'm assuming the 00000000-01DB-C391 is the time?
If I convert 01DB-c391 to human-readable time it's 27th Dec 1970 :)

I've checked the time on the server, and that is correct.
And, in the call log report, the same call shows with the correct time.

So, my question is: how do I convert 00000000-01DB-C391 to say 13th May 2025 11:00? (NZ Time)

Thanks,
marc
 
there are fields which are explicitly specifying exact time stamps of each connection(cdroutput record) - cdr_started_at, cdr_ended_at, cdr_answered_at.
The call flow is started by cdr with call_init (creation_method) . the cdr_started_at is the time when call flow has started.
the call flow is the set of the connections (cdroutput records) which are grouped by main_call_history_id. uuid fields are not a source of "time".
 
Last edited:
Thanks Stepan,

cdr_started_at was where I was expecting to find the time.
But, the only thing I can see under cdr_started_at is Date Hierarchy.
1747167211921.png
Same with cdr_answered_at, and cdr_ended_at.
This does have the correct day in it, but there is no "time".
 
Thanks Stepan,

cdr_started_at was where I was expecting to find the time.
But, the only thing I can see under cdr_started_at is Date Hierarchy.
View attachment 47849
Same with cdr_answered_at, and cdr_ended_at.
This does have the correct day in it, but there is no "time".

Im am in no means any good with PowerBI and i've literally just started using it today with the view of making a dashboard.. but I did manage to sort this one out to start with :P

You will need to transform the data and duplicate the column.

The time is in the value with the date.

1750951445377.png

Right click both columns and "change type" to "date" and "time"

1750951488799.png


1750951571203.png
 
  • Like
Reactions: paulodagraca
So, if this is my cdr_id {00000000-01DB-C391-9E82-7F1A000001FF} I'm assuming the 00000000-01DB-C391 is the time?

Two HEX digits per 8 bit byte so time section would be 01 DB C3 91 9E 82 7F 1A, but since the actual resolution is not mentioned, can't really do proper conversion. Proper time stamp fields are for that really.
 

Latest Posts

Forum statistics

Threads
111,973
Messages
590,074
Members
164,893
Latest member
jbergeon