by williamconley » Thu May 28, 2020 3:29 pm
No time to check, but I've bumped into this scenario before in both this and other software.
This scenario: Primary call record covers a period of time, other calls *may* occur during that call and are related, but since they begin and end at random times (based on agent activity) there is no "unique ID" or "matching start/end time". Thus you are left with HOPING that both records are related to yet a 3rd record in another table. For instance, is there an Agent Log that will have a link (directly OR indirectly) to the original call_log and also to the transfer call and/or recording.
Essentially, you are going to have to check the spider web of linked events and records and see if they will pull in the one you're trying to track. If you're lucky. If that works, you can use a JOIN in SQL to directly link the records and you're good. If not ...
The next phase is to build a routine that will use code to return records from the related tables "during this call". Some will create a link table to store the results and run the routine hourly to create an easier-to-use SQL link for later reporting.
Had similar issues in FreePBX. Their solution was imperfect, but pretty dang good.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294