CDR records grouping for an outgoing announced call transfer total time

I need to calculate the total call billsec’s of calls with multiple legs (call announcements with external transfers). The CDR records are queried using MySQL, but on which field data do I group the records to add up the total calltime?

billseeventtype                        lastdata                        dispositio    uniqueid                             recordingfile                        cnum  outbound_cnum sequence
     5ANSWER   SIP/VCX/28745896047,300,Tb(func-apply-sipheaders^s^1,(11ANSWERED  1580288978.276206out-07770745896047-4101-20200129-110938-1580288978.276206.wav4101 27871488676      293841
    13ANSWER   SIP/btcvo/27656332488,300,Tb(func-apply-sipheaders^s^1,(ANSWERED  1580288944.276125out-08330656332488-4101-20200129-110904-1580288944.276125.wav4101 0871352509       293756
    16ANSWER   SIP/VCX/27656332488,300,Tb(func-apply-sipheaders^s^1,(11ANSWERED  1580288513.275764out-07770656332488-4101-20200129-110153-1580288513.275764.wav4101 27871488676      293345

you can’t do that easily from the cdr (CallDetailRecord) table without lots of inner joiins, that is why the cel (ChannellEventLog) table came into existence.

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5242932

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