Hello all. I have a little unusual log lookup need. We have a client with Avaya system that we installed equipment to establish a SIP trunk on registered to an inbound/outbound carrier on ViciDial. During certain hours, the client forwards their inbound DID calls to our agents via the SIP trunk on a fake ViciDial DID which is routed to an ingroup, we determine the correct client department the inbound caller needs to speak with and we do a 3-way dial with customer to the correct Avaya 4 digit extension via carrier dial plan of _88ZXXX, when Avaya extension is answered, our agent introduces caller to our client then leaves the 3-way call and dispos the call with XFER status code on successful answer at the Avaya extension. This setup works great. Now for the question. Our client wants a report of how many calls were "transferred" to which Avaya extensions. I see the info I need in call_log and vicidial_agent_log tables but I see no common field to join a query on. (BTW, the Avaya system is not sending us the caller ID, it is sending 1111 so we do not have a unique lead_id to zone in on".
Any way to get the called_number where agent dispo status is XFER and campaign_id = "MYCAMPAIGN"?