My typical use case for FreePBX is as follows:
- A Caller calls into the main DID number for my FreePBX instance
- An IVR answers with a menu to select from one of several queues
- Caller select a queue
- An agent from selected queue answers
- Caller gives the agent a number (for target Callee) to dial and add to the existing call
- Agent dials Callee number given, when number is answered, agent merges the new call to the existing call making it a 3-party call (Caller, Agent, Callee)
- After talking for some time agent hangs up. I am assuming this will end calls to original Caller as well as the Callee called by agent (please confirm)
I need to be able to correlate:
- the original call from original Caller to agent
- with the second call added by agent to the Callee.
Looking at both CDR and CEL reports I see no way to correlate the two calls.
Here is an example from CEL log:
|Fri, Jan 6, 2023 2:50 PM||Agent extension||Callee number||5||-||show|
|Fri, Jan 6, 2023 2:50 PM||Caller number||DID number||96||-||show|
Here is the same call log from CDR:
|Call Date||Recording||System||CallerID||Outbound CallerID||DID||App||Destination||Disposition||Duration||Userfield||Account|
|Fri, 6 Jan 2023 14:51||1673034667.142||Agent extension||Dial||Callee number||ANSWERED||00:28|
|Fri, 6 Jan 2023 14:50||1673034605.138||“Operator:Caller number”||Dial||Agent extension||ANSWERED||01:30|
|Fri, 6 Jan 2023 14:50||1673034601.136||Caller number||DID number||Queue||3000||ANSWERED||01:35|
Is there a CORRELATION ID that can be somehow assigned and available in the CEL or CDR log? Also, am I better of using CDR or CEL log for my custom report? Seems CEL is better because it exports JSON but CDR is better because it has more granular data.
Lastly, can anyone guide me as to how to access the CEL or CDR report via an API call. The aternative would be to export the CDR or CEL report via GUI and then feed the CSV or JSON file to my custom report builder. I am hoping there is a better way to source the CDR/CEL data. TIA.