I will keep this short.
FREEPBX produces the following from two CDR reports against one extension:
22 Inbound / 8 Outbound calls for specific date -> After I eliminate the duplicates from the CDR report, I have 11 Inbound / 8 Outbound.
So, I have to come up with a SQL statement that matches 11 Inbound / 8 Outbound for that user. A simplified version of the SQL statement reads:
However, my results are 6 Inbound / 4 Outbound for the user.
So, the question is, what event types does FreePBX include in its SQL Statement and does it bother with using uniqueid in the query as they are not really unique.
Also, the database I am working with does not include a primary key for the CDR table, and there is no sequence field. I would like to avoid pulling back duplicate information, which FreePBX does on the Inbound.
Any assistance, suggestions, tips, etc would be much appreciated.