Getting simple call logs via Mysql script

Hi guys, I have enabled external access to the mysql database. I need to display the following per extension.

Incoming call - caller ID - Duration
Outgoing call - to - Duration

There seems to be various entries in the tables cdr and cel for each call.

Anyone have a magic MySql script to do this please.

About the Jobs category - Jobs - FreePBX Community Forums

PBX Call Accounting Module - PBX GUI - Documentation (freepbx.org)

CDR reports to an other server - FreePBX - FreePBX Community Forums

I have progress if anyone else needs it…

SELECT  * FROM cdr WHERE calldate in (SELECT max(calldate) FROM cdr GROUP BY uniqueid) AND cnum = 200  ORDER BY calldate DESC
1 Like

I would use = rather than IN, bu I suppose you might get the same query plan.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.